Update initNavidrome_http.sh

This commit is contained in:
arul 2024-06-02 20:48:10 +00:00
parent 6001b40925
commit 3f85c69e5f

View File

@ -1,9 +1,18 @@
# Set the target host and port
TARGET_HOST="androidnasserver1"
TARGET_PORT="80"
LOCAL_PORT="4533"
SERVEO_DOMAIN="serveo.net"
EXISTING_SSH_PID=$(pgrep -f "ssh -R 80:localhost:4533 serveo.net")
echo $EXISTING_SSH_PID
if ! [ -n "$EXISTING_SSH_PID" ]; then
# Start reverse proxy in the background
nohup caddy reverse-proxy --from :2637 --to :4533
ssh -R $TARGET_HOST:$TARGET_PORT:127.0.0.1:$LOCAL_PORT $SERVEO_DOMAIN > /data/data/com.termux/files/home/.cronlog/cronlog.txt 2>&1 &
nohup caddy reverse-proxy --from :2637 --to :4533
fi