diff options
Diffstat (limited to 'bin-security/boundary-bin/init.d/boundary-worker')
-rwxr-xr-x | bin-security/boundary-bin/init.d/boundary-worker | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bin-security/boundary-bin/init.d/boundary-worker b/bin-security/boundary-bin/init.d/boundary-worker new file mode 100755 index 0000000..e4d3225 --- /dev/null +++ b/bin-security/boundary-bin/init.d/boundary-worker @@ -0,0 +1,29 @@ +#!/bin/bash + +. /etc/sysconfig/boundary + +PROGRAM=/usr/bin/boundary +ARGS="server -config=/etc/boundary/worker.hcl $BOUNDARY_WORKER_ARGS" +RUNLEVEL=3 +NEEDS="+network" + +start() { + echo "Starting $NAME..." + + TIMEOUT=3 + + su boundary -s /bin/sh -c "set -o pipefail; $PROGRAM $ARGS 2>&1 | logger -ip daemon.info -t boundary-worker" & + ppid=$! + + sleep $TIMEOUT && pgrep -P $ppid > /dev/null || wait $ppid + + evaluate_retval +} + +stop() { + echo "Stopping $NAME..." + + killproc "boundary server -config=/etc/boundary/worker.hcl" SIGINT +} + +. /etc/init.d/smgl_init |