Browse Source

Fixed systemd service

Brendan Abolivier 3 years ago
parent
commit
3bd07532c0
Signed by: Brendan Abolivier <contact@brendanabolivier.com> GPG key ID: 8EF1500759F70623
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      init/linux-systemd/smam.service

+ 4
- 2
init/linux-systemd/smam.service View File

@@ -7,11 +7,13 @@ Requires=caddy.service
7 7
 
8 8
 [Service]
9 9
 Restart=on-failure
10
-; User smam's home directory is the directory where SMAM's server.js is found
10
+; Use a specific user
11 11
 User=smam
12 12
 Group=smam
13
+; Working directory
14
+WorkingDirectory=/etc/smam
13 15
 ; Start with NPM
14
-ExecStart=npm start
16
+ExecStart=/usr/bin/npm start
15 17
 
16 18
 [Install]
17 19
 WantedBy=multi-user.target