Skip to content

Commit

Permalink
flux +bin/psv.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sam#gemmi-win10 committed Dec 6, 2023
1 parent df7136a commit 83a8779
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions flux/src/bin/psv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/sh

cmd=$1
shit
args=$@
case "$cmd" in
status)
if [ "" == "$args" ]
perpls
else
perpstat $args
fi
;;
start|stop)
if [ "start" == "$cmd" ]
perpctl up $args
else
perpctl down $args
fi
# D (meta-Down) # U (meta-Up)
# When given in upper-case, the d (down) and u (up) commands
# described above are applied to both the main and log services.
;;
enable|disable)
if [ "enable" == "$cmd" ]
perpctl A $args
else
perpctl X $args
fi
;;
help)
echo "example: sv status, sv start/stop xxx, sv enable/disable xxx, sv pause/continue xxx"
;;
# a (alarm)
# h (hup)
# i (interrupt)
# k (kill)
# q (quit)
# t (term)
# w (winch)
# 1 (usr1)
# 2 (usr2)
# Send the service a corresponding signal: SIGALRM, SIGHUP, SIG-INT
# , SIGKILL, SIGQUIT, SIGTERM, SIGWINCH, SIGUSR1 or SIGUSR2.

*)
perpctl $cmd $args
;;
esac

0 comments on commit 83a8779

Please sign in to comment.