scripts/start.sh hinzugefügt
This commit is contained in:
23
scripts/start.sh
Normal file
23
scripts/start.sh
Normal 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
|
Reference in New Issue
Block a user