From 254d1d61386ce516bf02589bc96a64d9ed2bdf78 Mon Sep 17 00:00:00 2001 From: ishaan <> Date: Wed, 1 Jul 2026 10:11:39 +0530 Subject: init --- windscribe-helper.initd | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 windscribe-helper.initd (limited to 'windscribe-helper.initd') diff --git a/windscribe-helper.initd b/windscribe-helper.initd new file mode 100755 index 0000000..a2fecdb --- /dev/null +++ b/windscribe-helper.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Windscribe helper daemon + +description="Windscribe VPN helper daemon" +command="/opt/windscribe/helper" +command_background="yes" +pidfile="/run/windscribe/helper.pid" + +# Ensure /run/windscribe exists before starting +start_stop_daemon_args="--make-pidfile" + +depend() { + # Upstream systemd unit: Before=network-pre.target + # OpenRC equivalent: start before network mounts so helper can manage routes/firewall + before netmount +} + +start_pre() { + # Ensure runtime directories exist with correct perms + checkpath -d -m 0755 -o root:windscribe /run/windscribe + checkpath -d -m 0755 -o root:windscribe /var/log/windscribe + checkpath -d -m 0755 -o root:windscribe /var/tmp/windscribe + checkpath -d -m 0755 -o root:windscribe /var/lib/windscribe +} + +stop_post() { + # Clean up cgroup routing tables if helper created them + if [ -x /opt/windscribe/scripts/cgroups-down ]; then + /opt/windscribe/scripts/cgroups-down >/dev/null 2>&1 || true + fi +} -- cgit v1.3