commit 27ed1ac
hovercats
·
2023-09-02 15:22:23 +0000 UTC
parent 571bfee
fix the order for the run function. also $2 is replaced by $serv in the loop
1 files changed,
+6,
-6
M
rcsm
M
rcsm
+6,
-6
1@@ -9,16 +9,16 @@ fn usage {
2
3 fn run {
4 if (test -z $2) {
5- test -e $basedir/avail/$2 || printf 'Service not found\n'
6- test -x $basedir/avail/$2 || printf 'Servicefile not executable\n'
7- $basedir/avail/$2 $1 >/dev/null >[1=2] &
8- }
9- if not {
10 for (serv in $basedir/run) {
11 test -x $serv || printf 'Servicefile not executable\n'
12- $basedir/run/$2 $1 >/dev/null >[1=2] &
13+ $basedir/run/$serv $1 >/dev/null >[1=2] &
14 }
15 }
16+ if not {
17+ test -e $basedir/avail/$2 || printf 'Service not found\n'
18+ test -x $basedir/avail/$2 || printf 'Servicefile not executable\n'
19+ $basedir/avail/$2 $1 >/dev/null >[1=2] &
20+ }
21 }
22
23 switch($1) {