- Replace systemd units with OpenRC init scripts (supervise-daemon) - Add wirecon-watchdog-loop.sh since OpenRC has no timers - Switch install.sh to apk + rc-update - Update bootstrap.sh to install git/bash via apk - New proxmox/create-lxc.sh: picks next VMID, downloads Alpine template, creates unprivileged LXC with tun passthrough, chains bootstrap - Rewrite README around the Proxmox one-liner flow
21 lines
516 B
Bash
Executable File
21 lines
516 B
Bash
Executable File
#!/bin/bash
|
|
# Supervised loop: run the watchdog tick every WATCHDOG_INTERVAL seconds.
|
|
# Kept separate from wirecon-watchdog.sh so the tick logic remains testable
|
|
# as a one-shot (`/usr/local/bin/wirecon-watchdog.sh`).
|
|
|
|
set -uo pipefail
|
|
|
|
CONF="${WIRECON_CONF:-/etc/wirecon/wirecon.conf}"
|
|
# shellcheck source=/dev/null
|
|
[[ -r "$CONF" ]] && source "$CONF"
|
|
|
|
: "${WATCHDOG_INTERVAL:=20}"
|
|
|
|
trap 'exit 0' SIGTERM SIGINT
|
|
|
|
while :; do
|
|
/usr/local/bin/wirecon-watchdog.sh || true
|
|
sleep "$WATCHDOG_INTERVAL" &
|
|
wait $!
|
|
done
|