update
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ Description=gin-article Application
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=app
|
User=appruner
|
||||||
WorkingDirectory=APP_PATH
|
WorkingDirectory=APP_PATH
|
||||||
ExecStart=APP_PATH/app >> APP_PATH/app.log 2>&1
|
ExecStart=APP_PATH/app >> APP_PATH/app.log 2>&1
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# 判断 app 用户是否存在
|
# 判断 app 用户是否存在
|
||||||
if id "app" >/dev/null 2>&1; then
|
if id "appruner" >/dev/null 2>&1; then
|
||||||
echo "User app exists."
|
echo "User appruner exists."
|
||||||
else
|
else
|
||||||
# 创建 app 用户
|
# 创建 app 用户
|
||||||
echo "Creating user app..."
|
echo "Creating user appruner..."
|
||||||
useradd -m -s /bin/bash app
|
useradd -m -s /bin/bash appruner
|
||||||
fi
|
fi
|
||||||
|
|
||||||
app_name=gin-article
|
app_name=gin-article
|
||||||
|
|||||||
Reference in New Issue
Block a user