commit 125f70e
hovercats
·
2023-09-01 15:59:51 +0000 UTC
parent 5d4721d
add -a case statement to activate a service
1 files changed,
+8,
-0
M
rcsm
M
rcsm
+8,
-0
1@@ -8,6 +8,14 @@ fn usage {
2 }
3
4 switch($1) {
5+case -a
6+ if (test -e $basedir/avail/$2) {
7+ ln -sf $basedir/avail/$2 $basedir/run/
8+ }
9+ if not {
10+ printf 'Service not found\n'
11+ exit 1
12+ }
13 case -c
14 test -d $basedir/run || mkdir -p $basedir/run
15 test -d $basedir/avail || mkdir -p $basedir/avail