添加 PM2 守护 portwardenc-amd64 程序支持

This commit is contained in:
xucheng 2025-10-31 22:13:07 +08:00
parent 93199f8659
commit 69b1b481b2
2 changed files with 28 additions and 0 deletions

View File

@ -16,5 +16,15 @@ module.exports = {
env: {
"PYTHONPATH": "."
}
}, {
name: "portwardenc",
cwd: ".",
script: "./portwardenc-amd64",
interpreter: "none",
env: {
"SERVER_ADDR": "http://bastion.3prism.ai:7000",
"SERVICE_ID": "FUNDAMENTAL",
"LOCAL_PORT": "3000"
}
}]
};

View File

@ -103,11 +103,29 @@ module.exports = {
env: {
"PYTHONPATH": "."
}
}, {
name: "portwardenc",
cwd: ".",
script: "./portwardenc-amd64",
interpreter: "none",
env: {
"SERVER_ADDR": "http://bastion.3prism.ai:7000",
"SERVICE_ID": "FUNDAMENTAL",
"LOCAL_PORT": "3000"
}
}]
};
EOL
fi
# Check and prepare portwardenc-amd64
if [ -f "portwardenc-amd64" ]; then
echo "Setting execute permission for portwardenc-amd64..."
chmod +x portwardenc-amd64
else
echo "Warning: portwardenc-amd64 file not found. It will be skipped."
fi
# Start processes with pm2
pm2 start pm2.config.js