Fix the service file so it should work from startup

This commit is contained in:
Kelvin Ly (on the cloud) 2018-09-28 02:10:37 +00:00
parent b9d3043407
commit 9b8ad465d7
2 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,8 @@ Description=My main HTTP server
After=network.target syslog.target After=network.target syslog.target
[Service] [Service]
Type=oneshot Type=forking
PIDFile=/tmp/kelvinly-server-pid
ExecStart=/home/kelvin/kelvinly-server/kelvinly-server ExecStart=/home/kelvin/kelvinly-server/kelvinly-server
StandardOutput=syslog StandardOutput=syslog
StandardError=syslog StandardError=syslog

View File

@ -99,7 +99,7 @@ func main() {
PidFilePerm: 0644, PidFilePerm: 0644,
LogFileName: "/tmp/kelvinly-server-log", LogFileName: "/tmp/kelvinly-server-log",
LogFilePerm: 0640, LogFilePerm: 0640,
WorkDir: "./", WorkDir: "/home/kelvin/kelvinly-server/",
Umask: 027, Umask: 027,
} }
// TODO: figure out the daemonizing stuff // TODO: figure out the daemonizing stuff