Update market, account, and onion operations
Capture the current CyberLux UI, commerce, messaging, and Tor ops updates so local main can be pushed to the remote. Made-with: Cursor
This commit is contained in:
19
scripts/start-onion-if-needed.sh
Executable file
19
scripts/start-onion-if-needed.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Start CyberLux onion backend if 127.0.0.1:3000 is not already occupied.
|
||||
# Used by the user systemd unit and @reboot cron fallback.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REPO="/home/drjones/cyberlux"
|
||||
LOG="${REPO}/logs/onion-runtime.log"
|
||||
|
||||
mkdir -p "${REPO}/logs"
|
||||
|
||||
if command -v ss >/dev/null 2>&1 && ss -ltn 'sport = :3000' | grep -q '127.0.0.1:3000'; then
|
||||
echo "$(date -Is) cyberlux already listening on 127.0.0.1:3000" >>"${LOG}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd "${REPO}"
|
||||
node scripts/generate-onion-config.cjs >>"${LOG}" 2>&1
|
||||
exec npm run start:onion >>"${LOG}" 2>&1
|
||||
Reference in New Issue
Block a user