Files
iceBear67 ad1ea04549 feat: overhaul container initialization and entrypoint
- Replace apt-get with apt in Dockerfile
- Add tini as init system and set ENTRYPOINT/CMD
- Simplify init.fish by removing first-run logic and tmux session management
- Add landing.fish and SIGTERM signal handling
- Improve container lifecycle management
2025-09-25 17:20:58 +08:00

26 lines
500 B
Fish

function init
if test -f /usr/sbin/tailscaled
echo "Starting tailscaled"
chmod +x /usr/sbin/tailscaled
nohup /usr/sbin/tailscaled \
--tun=userspace-networking \
--socks5-server=localhost:1080 > /dev/null 2>&1 &
echo "Started!"
end
echo "Looking for services from /etc/init.d/"
for script in /etc/init.d/*
if test -x script
nohup $script start > /dev/null 2>&1 &
end
end
end
init
function on_term --on-signal SIGTERM
echo "SIGTERM received, exiting"
exit
end
fish