How to change daemon usr in systemd?

General support questions
Post Reply
labskaus
Posts: 1
Joined: 2015/09/16 13:57:20

How to change daemon usr in systemd?

Post by labskaus » 2015/09/16 14:04:19

I have some problems with my icinga installation. I need to run rrdcached as user icinga

my rrdcached.service script

Code: Select all

[Unit]
Description=RRDtool cache
#daemonAfter=network.target

[Service]
Type=forking
USER=icinga
#PIDFile=/var/rrdtool/rrdcached/rrdcached.pid
ExecStart=/usr/bin/rrdcached -s icinga -m 774 -l unix:/var/rrdtool/rrdcached/rrdcached.socket -w 3600 -f 7200 -p /var/rrdtool/rrdcached/rrdcached.pid -j /var/rrdtool/rrdcached/
#ExecStartPost=/usr/bin/chown icinga:icinga /var/rrdtool/rrdcached/*

[Install]
WantedBy=multi-user.target


end sup in

Code: Select all

root      4723     1  0 15:51 ?        00:00:00 /usr/bin/rrdcached -s icinga -m 774 -l unix:/var/rrdtool/rrdcached/rrdcached.socket -w 3600 -f 7200 -p /var/rrdtool/rrdcached/rrdcached.pid -j /var/rrdtool/rrdcached/
Does any one have an idea? The hint with "ExecStartPost" does not work.

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to change daemon usr in systemd?

Post by TrevorH » 2015/09/16 14:21:31

Think maybe that should be User= not USER=
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply