13 lines
336 B
Plaintext
13 lines
336 B
Plaintext
|
#!/usr/bin/env /lib/runit/invoke-run
|
||
|
# shellcheck shell=sh
|
||
|
set -e
|
||
|
|
||
|
NAME="$(basename "$(dirname "$0")")"
|
||
|
SUPERVISE_DIR="/var/run/runit/supervise/$NAME"
|
||
|
|
||
|
mkdir -p "$SUPERVISE_DIR" && chmod 700 "$SUPERVISE_DIR"
|
||
|
[ ! -h supervise ] && rm -rf supervise && ln -s "$SUPERVISE_DIR" supervise
|
||
|
|
||
|
sv once "$NAME"
|
||
|
exec /etc/init.d/"$NAME" start 2>&1
|