Am 23.01.2013 14:48, schrieb Antonio: > In /lib/systemd/system/[email protected] file, I read how to edit it > to create a 'service unit file'. > These lines > > >ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i" > >ExecStop=/sbin/runuser -l <USER> -c "/usr/bin/vncserver -kill %i" > > consider the use of 'runuser' command that causes an error when I try > to start 'vncserver@.()service': > > >runuser: cannot set groups:Operation not permitted. > > The only way, by which I can avoid it, is by erasing 'runuser' from > Exec* lines: > > >ExecStart=/usr/bin/vncserver %i > >ExecStop=/usr/bin/vncserver -kill %i > > But this changes extremely the 'vncserver' launch.
and why do you not use the User= and Group= options? see below, you can even set priority and io-scheduling [root@xxx:~]$ cat /usr/lib/systemd/system/serverstatus.service [Unit] Description=Serverstatus After=network.target [Service] Type=simple ExecStart=/usr/bin/php /usr/local/serverstatus/serverstatus.php Restart=always RestartSec=1 TimeoutSec=15 Nice=19 IOSchedulingClass=3 User=wwwcron Group=apache [Install] WantedBy=multi-user.target
signature.asc
Description: OpenPGP digital signature
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
