myos/ansible/roles/hosts/files/etc/sv/myos/run

13 lines
336 B
Plaintext
Raw Normal View History

2022-06-22 10:02:09 +02:00
#!/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