aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-08-22 10:28:30 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-08-22 10:28:30 +0200
commitb9c8b09c1e3d3df23da3334536c9f8090b1bd15d (patch)
tree7deff87275d8cb396a7a6a6cc9cce7503e24139f
parent8fe2a1fda4563ce7a49beef8c6b32157f4e185ab (diff)
Add status command
-rw-r--r--README.md1
-rwxr-xr-xpool.sh9
2 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0207ec1..269f7a0 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@
- Processes in a pool can be paused with `./pool.sh pause <poolname>`
- Processes in a pool can be resumed with `./pool.sh resume <poolname>`
- Available pools can be retrieve with `./pool.sh ls`
+- The status of a pool can be seen with `./pool.sh status <poolname>`
- All the processes output file can be retrieve with `./pool.sh ls-output <poolname>`
**Final quote:** No checks are performed the arguments. Thus, be sure to use the right ones. The default configuration requires access to the `/tmp` directory and uses name conventions which may clash with the existing content of `/tmp` if you are very unlucky. If in this the case, you can edit `pool.sh` to avoid those clashes.
diff --git a/pool.sh b/pool.sh
index 7336545..6f3262f 100755
--- a/pool.sh
+++ b/pool.sh
@@ -121,6 +121,11 @@ wait_pool() {
done
}
+status() {
+ refresh
+ cat "${POOL_STATUS}"
+}
+
list_output() {
refresh
find "${POOL}" -name "out_*"
@@ -214,6 +219,10 @@ case "$CMD" in
check_pool
resume
;;
+ "status")
+ check_pool
+ status
+ ;;
*)
abort "Command $CMD unknown"
esac