addseed-web/start.sh

15 lines
295 B
Bash
Raw Normal View History

2024-10-22 15:36:41 +08:00
#!/bin/bash
# 确保脚本以root权限运行
if [ "$(id -u)" != "0" ]; then
echo "该脚本必须以root权限运行" 1>&2
exit 1
fi
pm2 startup
pm2 save
pm2 start --name addseed-web npm -- run start
pm2 set your-app-name autorestart true
pm2 save
echo "PM2启动脚本执行完毕。"