Systemd init script for ServiceDesk
Greetings,
Since moving to CentOS 7 and looking everywhere for a systemd init
script i have come up with my own, you only need to change the path to
your application and add it to your runlevels for it to work:
Create this file:
/usr/lib/systemd/system/servicedesk.service
and fill it with this:
[Unit]
Description=ServiceDesk
After=syslog.target
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/home/ServiceDesk/bin
ExecStart=/home/ServiceDesk/bin/run.sh
ExecStop=/home/ServiceDesk/bin/shutdown.sh -S
KillMode=none
TimeoutSec=300
[Install]
WantedBy=multi-user.target
Then make it start automatically:
systemctl enable
servicedesk.service
systemctl start servicedesk.service
To make it stop or view it's status:
systemctl stop
servicedesk.service
systemctl status servicedesk.service -l
Hope this helps someone!
New to ADSelfService Plus?