You are not logged in.
I've written this systemd service
[Unit]
Description=Note Server
After=mongod.service
[Service]
Type=forking
User=devin
PIDFile=/var/tmp/noted.pid
ExecStart=/home/devin/.note_env/bin/noted -d -p /var/tmp/noted.pid
Restart=on-abort
[Install]
WantedBy=multi-user.targetThe noted program daemonizes (by forking, it's ppid is 1) and exits with a 0 return code.
Whenever I try "systemctl start noted", it starts noted fine (as far as I can tell) but systemctl hangs. If I ctrl-C systemctl, everything seems to work OK.
There's not too much going in from journalctl, however the user is wrong, I've set it to be my local user account but it shows root.
Dec 17 22:57:03 dk-thinkpad sudo[17900]: devin : TTY=pts/4 ; PWD=/home/devin ; USER=root ; COMMAND=/usr/bin/systemctl --output=verbose start noted
Dec 17 22:57:03 dk-thinkpad sudo[17900]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 17 22:57:03 dk-thinkpad sudo[17900]: pam_unix(sudo:session): session closed for user rootAny ideas?
As an aside: where's a good place for a non-root user to make a PID file? /var/tmp doesn't seem like the best choice. Should I just chgrp /var/run and add myself to whatever I chose?
Offline
Don't daemonize...
Offline