scripts/start.sh hinzugefügt

This commit is contained in:
2025-03-21 13:21:49 +01:00
parent 85764956f9
commit 79d01cc711

23
scripts/start.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
if [ ! -f ${DATA_DIR}/iptables ]; then
echo "ERROR: iptables not found, please create the file 'iptables' in the main directory!"
sleep infinity
else
while IFS= read -r line; do
if [ -z "$line" ]; then
continue
fi
echo "Applying: $line"
eval "$line"
done < "${DATA_DIR}/iptables"
fi
echo "---Starting...---"
term_handler() {
echo "---Stopping Tailscale Forwarder---"
kill -SIGTERM $(pidof sleep)
exit 143;
}
trap 'kill ${!}; term_handler' SIGTERM
sleep infinity