I have init script which works fine. On a good day It will do all the following;
/etc/init.d/my-good-script.sh {start|stop|status|info|check|config|timetravel}
Now since systemd
is the new norm, I want to translate my-good-script.sh
into a Systemd Service File
I found an online example like the following;
[Unit]
Description=Postfix Mail Transport Agent
After=syslog.target network.target
Conflicts=sendmail.service exim.service
[Service]
Type=forking
PIDFile=/var/spool/postfix/pid/master.pid
EnvironmentFile=-/etc/sysconfig/network
ExecStartPre=-/usr/libexec/postfix/aliasesdb
ExecStartPre=-/usr/libexec/postfix/chroot-update
ExecStart=/usr/sbin/postfix start
ExecReload=/usr/sbin/postfix reload
ExecStop=/usr/sbin/postfix stop
[Install]
WantedBy=multi-user.target
Followed it and was able to do;
systemctl {start|stop|status} my-good-script
But I am not very sure how to do;
systemctl {info|check|config|timetravel} my-good-script
Is this even possible or what is the workaround?