host-ctr-scripts/ctr-wrapper.sh
Vincent Batts 1748fdcf26
initial commit
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2018-10-17 13:34:56 -04:00

23 lines
496 B
Bash
Executable file

#!/bin/sh
# Script: /usr/local/bin/wrapper.sh
case "$SSH_ORIGINAL_COMMAND" in
"reboot")
exec machinectl reboot bip."${SUDO_USER}"
;;
"start")
exec machinectl start bip."${SUDO_USER}"
;;
"poweroff")
exec machinectl poweroff bip."${SUDO_USER}"
;;
"status")
exec machinectl status bip."${SUDO_USER}"
;;
*)
exec machinectl shell bip."${SUDO_USER}"
#echo "Sorry. Only these commands are available to you:"
#echo "ps, vmstat, cupsys stop, cupsys start"
#exit 1
;;
esac