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
[Service]
Type=oneshot
Type=forking
PIDFile=/tmp/kelvinly-server-pid
ExecStart=/home/kelvin/kelvinly-server/kelvinly-server
StandardOutput=syslog
StandardError=syslog

View File

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