Fixes Tor iptables and, in the Docker entry, stores Redis and Tor logs into the /var/vlogs/ directory.

This commit is contained in:
Shahrad Elahi
2023-09-27 03:37:38 +03:30
parent c521faf7df
commit c69b0cb5b0
6 changed files with 90 additions and 69 deletions

View File

@@ -15,14 +15,13 @@ if [ ! -d "/data" ]; then
chmod 700 /data
fi
# Starting Redis server in detached mode
screen -dmS redis bash -c "redis-server --port 6479 --daemonize no --dir /data --appendonly yes"
mkdir -p /var/vlogs
# Start Tor in the background
screen -dmS tor bash -c "sleep 1; tor -f /etc/tor/torrc"
screen -L -Logfile /var/vlogs/tor -dmS tor bash -c "tor"
# If WG_HOST exists, again export it as NEXT_PUBLIC_WG_HOST
export NEXT_PUBLIC_WG_HOST="$WG_HOST"
# Starting Redis server in detached mode
screen -L -Logfile /var/vlogs/redis -dmS redis bash -c "redis-server --port 6479 --daemonize no --dir /data --appendonly yes"
# After 5 seconds, export the database to the WireGuard config file
screen -dm bash -c "sleep 5; curl -s -o /dev/null http://127.0.0.1:3000/api/wireguard/regen"