@typhons/sandbox-tools 0.6.6 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/start-webchat.sh +6 -0
package/package.json
CHANGED
package/start-webchat.sh
CHANGED
|
@@ -52,6 +52,12 @@ if [ -z "$WEBCHAT_USER" ]; then
|
|
|
52
52
|
fi
|
|
53
53
|
[ -z "$WEBCHAT_USER" ] && WEBCHAT_USER=$(ls /home 2>/dev/null | grep -vx node | head -1)
|
|
54
54
|
|
|
55
|
+
# Remove any stale log first. A prior run may have left it owned by a DIFFERENT
|
|
56
|
+
# box user (e.g. the old buggy 'node' detection); fs.protected_regular on /tmp
|
|
57
|
+
# then blocks the new user's `>> /tmp/webchat.log` even at 0666, so node never
|
|
58
|
+
# starts — silently. rm (we're root here) lets the launching user recreate it.
|
|
59
|
+
rm -f /tmp/webchat.log 2>/dev/null || true
|
|
60
|
+
|
|
55
61
|
if [ -n "$WEBCHAT_USER" ] && id "$WEBCHAT_USER" > /dev/null 2>&1; then
|
|
56
62
|
su -s /bin/bash "$WEBCHAT_USER" -c "WEBCHAT_PORT=$PORT nohup node '$BIN' >> /tmp/webchat.log 2>&1 &"
|
|
57
63
|
echo "[start-webchat] started on :$PORT as $WEBCHAT_USER ($BIN)"
|