own service

Reindl Harald h.reindl at thelounge.net
Tue Mar 13 15:45:31 UTC 2012


first: please use a subject!

Am 13.03.2012 16:41, schrieb shreyas m:
> I want a process to be running with root privileges, without providing the root password. Since i have my process
> in a remote machine. I want it such that, as soon as the system boots up, my process should be running with root
> privilege. Is there any way in which i can attain it?
> Is there any possibility of forking c program as a child process of init process.
> If so please guide me on how to do it.

what you mean is simply a service
/etc/systemd/system/my.service
___________________________

[Unit]
Description=MyService
After=syslog.target network.target

[Service]
Type=simple
ExecStart=/abs/path/yo/your/binary

[Install]
WantedBy=multi-user.target
___________________________

systemctl enable my.service

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20120313/6ed3b225/attachment.sig>


More information about the users mailing list