弃用 pm2, 使用 systemctl 管理进程

This commit is contained in:
2023-12-06 18:24:47 +08:00
parent df7b905c09
commit f048bd3684
4 changed files with 44 additions and 9 deletions

View File

@@ -13,7 +13,13 @@ scp dist/main $host:~/webp/main
rm -rf dist
# 重载服务
ssh $host "pm2 reload webp"
ssh $host "systemctl restart webp"
# 删除旧文件
ssh $host "rm ~/webp/main_old"
# 设为系统服务
# sudo cp webp.service /etc/systemd/system/webp.service
# 设置日志轮转
# sudo cp webp.logrotate /etc/logrotate.d/webp