I try to use the init script provided in the Github repo to run Gogs on startup as a service on my Centos 6.7 VPS. However, it does not work and I get the following error in the log file:
“[…s/setting/setting.go:419 NewContext()] [E] Expect user(root) but current user is:”
I try to run the service as root and I set the environment variable USER and USERNAME correctly in the script, but this won’t fix the error. How can I autostart Gogs after boot and run it in the background?