fix: support legacy systemd path parsing
This commit is contained in:
+7
-3
@@ -442,8 +442,8 @@ User=$ERP_USER
|
||||
Group=$ERP_GROUP
|
||||
Environment="ERP_INSTALL_ROOT=$INSTALL_ROOT"
|
||||
Environment="ERP_CONFIG_FILE=$CONFIG_FILE"
|
||||
WorkingDirectory="$INSTALL_ROOT"
|
||||
ExecStart="$INSTALL_ROOT/current/bin/erp-run"
|
||||
WorkingDirectory=$INSTALL_ROOT
|
||||
ExecStart=$INSTALL_ROOT/current/bin/erp-run
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
TimeoutStopSec=90
|
||||
@@ -453,12 +453,16 @@ NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
ReadWritePaths="$INSTALL_ROOT" "$CONFIG_ROOT" "$STATE_ROOT" "$LOG_ROOT"
|
||||
ReadWritePaths=$INSTALL_ROOT $CONFIG_ROOT $STATE_ROOT $LOG_ROOT
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
if command -v systemd-analyze >/dev/null 2>&1; then
|
||||
systemd-analyze verify /etc/systemd/system/kaidi-erp.service \
|
||||
|| fail 'generated systemd unit is invalid; run systemd-analyze verify /etc/systemd/system/kaidi-erp.service'
|
||||
fi
|
||||
systemctl enable kaidi-erp.service
|
||||
systemctl restart kaidi-erp.service
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user