mirror of
https://github.com/DeNNiiInc/Connect-5.git
synced 2026-10-12 21:01:28 +11:00
Fix: Dynamically detect Node.js path for systemd service
This commit is contained in:
1 parent
b03e287590
commit
eceb3aafc5
1 file changed
+6
@@ -35,6 +35,12 @@ fi
|
||||
echo "Updating WorkingDirectory path..."
|
||||
sed -i "s|WorkingDirectory=.*|WorkingDirectory=$PROJECT_DIR|g" "$SERVICE_FILE"
|
||||
|
||||
# Update ExecStart to match the actual Node.js path
|
||||
NODE_PATH=$(which node)
|
||||
echo "Updating Node path to: $NODE_PATH"
|
||||
sed -i "s|ExecStart=.*|ExecStart=$NODE_PATH server.js|g" "$SERVICE_FILE"
|
||||
|
||||
|
||||
# Copy service file
|
||||
echo "Installing systemd service..."
|
||||
cp "$SERVICE_FILE" "$SYSTEMD_PATH"
|
||||
|
||||
Reference in new issue
Block a user