diff options
author | Guillermo Ramos | 2020-05-16 17:42:01 +0200 |
---|---|---|
committer | Guillermo Ramos | 2020-05-16 17:42:01 +0200 |
commit | edc912e5617f41326c1198aad7ff813081e34abf (patch) | |
tree | 98624b4507e3f30a84a34fe879ee931ae0fbd2ab | |
parent | adc123903f329e157bfeeab1c9b8a832ce87c2df (diff) | |
download | s6-services-edc912e5617f41326c1198aad7ff813081e34abf.tar.gz |
Control scripts
-rwxr-xr-x | disable.sh | 5 | ||||
-rwxr-xr-x | enable.sh | 6 | ||||
-rwxr-xr-x | install.sh | 4 | ||||
-rwxr-xr-x | status.sh | 7 |
4 files changed, 22 insertions, 0 deletions
diff --git a/disable.sh b/disable.sh new file mode 100755 index 0000000..f5a0ccf --- /dev/null +++ b/disable.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +for svc in $@; do + rm ~/s6/service/$svc +done diff --git a/enable.sh b/enable.sh new file mode 100755 index 0000000..a14f4c8 --- /dev/null +++ b/enable.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +mkdir -p ~/s6/service +for svc in $@; do + ln -s ~/s6/services/$svc ~/s6/service/$svc +done diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..75113b1 --- /dev/null +++ b/install.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +mkdir -p /home/gramos/s6/services +stow --no-folding --ignore='.*\.sh' -t /home/gramos/s6/services . diff --git a/status.sh b/status.sh new file mode 100755 index 0000000..8eae367 --- /dev/null +++ b/status.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +shopt -s nullglob +for svc in ~/s6/service/*; do + echo -n "$(basename $svc): " + s6-svstat $svc +done |