From edc912e5617f41326c1198aad7ff813081e34abf Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Sat, 16 May 2020 17:42:01 +0200 Subject: Control scripts --- disable.sh | 5 +++++ enable.sh | 6 ++++++ install.sh | 4 ++++ status.sh | 7 +++++++ 4 files changed, 22 insertions(+) create mode 100755 disable.sh create mode 100755 enable.sh create mode 100755 install.sh create mode 100755 status.sh 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 -- cgit v1.2.3