1 #!/usr/bin/execlineb -P
4 # a sane example of handling the arguments would be nice
6 # populate some variables
8 define INSTANCE_NAME jane
9 backtick HOME { homeof ${RUN_USER} }
10 importas -n -u HOME HOME
12 # redirect STDERR to STDIN so it can be caught by a logging service
15 # switch to a different user for running this
16 s6-setuidgid ${RUN_USER}
21 pipeline { echo "system_powerdown\n" }
22 s6-ipcclient ${HOME}/${INSTANCE_NAME}-monitor.socket
27 # the command to start and supervise
28 imaginary_service -l 127.0.0.1 -p 31337 ${HOME}/run/listener_${INSTANCE_NAME}/${INSTANCE_NAME}.conf