Systemd: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
SourcePath=/var/qmail/bin/qmail | SourcePath=/var/qmail/bin/qmail | ||
Description=SYSV: Qmailtoaster MTA | Description=SYSV: Qmailtoaster MTA | ||
Before=multi-user.target | Before=multi-user.target | ||
Before=graphical.target<br> | Before=graphical.target<br> |
Revision as of 13:10, 22 August 2025
Systemd conversion
# unlink /usr/bin/qmailctl # mv /etc/init.d/qmail /etc/init.d/vusaged /var/qmail/bin # ln -s /var/qmail/bin/qmail /usr/bin/qmailctl
# cat > /etc/systemd/system/qmail.service <<EOF # Automatically generated by systemd-sysv-generator
[Unit] Documentation=man:systemd-sysv-generator(8) SourcePath=/var/qmail/bin/qmail Description=SYSV: Qmailtoaster MTA Before=multi-user.target Before=graphical.target
[Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes ExecStart=/var/qmail/bin/qmail start ExecStop=/var/qmail/bin/qmail stop ExecReload=/var/qmail/bin/qmail reload
[Install] WantedBy=default.target EOF
# reboot
Notes: All qmailctl functionlity is still intact. start, stop, status, and reload can be accomplished with the command 'systemctl [command] qmail'