the systemd service will never work as it is, the binary target is incorrect and the execution is as root.
Created attachment 350206 [details] functional bitlbee service
Reassigning to systemd since I don't have systems to test with.
This patch probably makes more sense; no reason to run as nobody when we are creating a dedicated user/group. John: Can you confirm this works for you? I'm not going to install/test this just for a simple user change. --- a/init/bitlbee.service.in +++ b/init/bitlbee.service.in @@ -4,6 +4,7 @@ [Service] ExecStart=@sbindir@/bitlbee -F -n +User=bitlbee [Install] WantedBy=multi-user.target
Also, since the unit file is provided by upstream, maybe a report to them could help to improve the unit file (and prevent us from needing to patch it forever)
(In reply to Pacho Ramos from comment #4) > Also, since the unit file is provided by upstream, maybe a report to them > could help to improve the unit file (and prevent us from needing to patch it > forever) Unfortunately upstream isn't very responsive at times, I still have patches sitting in trac tickets from a while ago. It's probably still good to try though.
Then, feel free to go ahead and commit Mike's patch :)
Running bitlbee as 'bitlbee' user shows another problem in 'journalctl' though: booxter@localhost /usr/lib/systemd/system $ sudo systemctl status bitlbee bitlbee.service - BitlBee IRC/IM gateway Loaded: loaded (/usr/lib64/systemd/system/bitlbee.service; enabled) Active: active (running) since Sun 2014-02-09 15:25:48 CET; 3s ago Main PID: 20819 (bitlbee) CGroup: /system.slice/bitlbee.service └─20819 /usr/sbin//bitlbee -F -n Feb 09 15:25:48 localhost systemd[1]: Started BitlBee IRC/IM gateway. Feb 09 15:25:48 localhost bitlbee[20819]: Warning: Warning: Couldn't write PID to `/var/run/bitlbee.pid' Feb 09 15:25:48 localhost bitlbee[20819]: Warning: Couldn't write PID to `/var/run/bitlbee.pid'
I think it's just a warning taking care it is running in non-forking mode, maybe upstream will know more about why that warning is shown when running with foreground options
Help for users: You can make both the run-as-wrong-user and can't-write-pid problems go away for now by creating /etc/systemd/system/bitlbee.service.d/fix-exec.conf containing these lines: [Service] ExecStart= ExecStart=/usr/sbin/bitlbee -F -n -P /dev/null User=bitlbee Various aspects of this could be used in Gentoo's ebuild fix, as well. By way of explanation of the one strange line, "ExecStart=", it just clears the ExecStart set by the main unit file. This is necessary because more than one is allowed, so they would stack by default instead of overriding. Explicitly clearing it first prevents that.
Should be fixed in 3.4.2-r1.