http://kezhong.wordpress.com/2011/11/19/creating-my-own-systemd-service-files-on-fedora-16x86_64/
Just a copy and paste:
- Create any script file or program to be run
- Give it execute permission
- Create the service file:
# vi /lib/systemd/system/<name>.service
[Unit]
Description=Desired text of description
After=syslog.target network.target
[Service]
Type=simple
ExecStart=<executable address>
[Install]
WantedBy=multi-user.target
- Make symbolic link
# ln -s /lib/systemd/system/radinfo.service cd /etc/systemd/system/radinfo.service - Make systemd take notice of it
# systemctl daemon-reload - Activate a service immediately
# systemctl start radinfo.service - Enable a service to be started on bootup
# systemctl enable radinfo.service
No comments:
Post a Comment