Browse Source

chore: update service file to ensure socket file is created correctly

Hintay 6 months ago
parent
commit
45d98f524e
2 changed files with 6 additions and 0 deletions
  1. 2 0
      install.sh
  2. 4 0
      nginx-ui.service

+ 2 - 0
install.sh

@@ -272,6 +272,8 @@ After=network.target
 [Service]
 Type=simple
 ExecStart=/usr/local/bin/nginx-ui -config /usr/local/etc/nginx-ui/app.ini
+RuntimeDirectory=nginx-ui
+WorkingDirectory=/var/run/nginx-ui
 Restart=on-failure
 TimeoutStopSec=5
 KillMode=mixed

+ 4 - 0
nginx-ui.service

@@ -2,11 +2,15 @@
 Description=Yet another WebUI for Nginx
 Documentation=https://github.com/0xJacky/nginx-ui
 After=network.target
+
 [Service]
 Type=simple
 ExecStart=/usr/local/bin/nginx-ui --config /usr/local/etc/nginx-ui/app.ini
+RuntimeDirectory=nginx-ui
+WorkingDirectory=/var/run/nginx-ui
 Restart=on-failure
 TimeoutStopSec=5
 KillMode=mixed
+
 [Install]
 WantedBy=multi-user.target