update
This commit is contained in:
@@ -11,10 +11,12 @@ cd ${app_path} && git pull
|
||||
# 执行 go build 命令
|
||||
cd ${app_path} && go build -o app
|
||||
|
||||
# 替换 app.service 文件中的 APP_PATH
|
||||
sed -i "s|APP_PATH|${app_path}|g" app.service
|
||||
cp app.service.example ${app_name}.service
|
||||
|
||||
cp app.service /etc/systemd/system/${app_name}.service
|
||||
# 替换 app.service 文件中的 APP_PATH
|
||||
sed -i "s|APP_PATH|${app_path}|g" ${app_name}.service
|
||||
|
||||
mv ${app_name}.service /etc/systemd/system/${app_name}.service
|
||||
|
||||
# 重新加载 systemd 配置文件
|
||||
systemctl daemon-reload
|
||||
|
||||
Reference in New Issue
Block a user