Systemd: Difference between revisions
Jump to navigation
Jump to search
(Created page with " '''Systemd conversion''' # unlink /usr/bin/qmailctl # mv /etc/init.d/qmail /etc/init.d/vusaged /var/qmail/bin # ln -s /usr/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=multi-user.target Before=multi-user.target Before=gra...") |
No edit summary |
||
Line 4: | Line 4: | ||
# mv /etc/init.d/qmail /etc/init.d/vusaged /var/qmail/bin | # mv /etc/init.d/qmail /etc/init.d/vusaged /var/qmail/bin | ||
# ln -s /usr/qmail/bin/qmail /usr/bin/qmailctl | # ln -s /usr/qmail/bin/qmail /usr/bin/qmailctl | ||
cat > /etc/systemd/system/qmail.service <<EOF | cat > /etc/systemd/system/qmail.service <<EOF<br> | ||
# Automatically generated by systemd-sysv-generator<br> | |||
# Automatically generated by systemd-sysv-generator | |||
[Unit] | [Unit] | ||
Documentation=man:systemd-sysv-generator(8) | Documentation=man:systemd-sysv-generator(8) | ||
Line 15: | Line 13: | ||
Before=multi-user.target | Before=multi-user.target | ||
Before=multi-user.target | Before=multi-user.target | ||
Before=graphical.target | Before=graphical.target<br> | ||
[Service] | [Service] | ||
Type=forking | Type=forking | ||
Line 27: | Line 24: | ||
ExecStart=/var/qmail/bin/qmail start | ExecStart=/var/qmail/bin/qmail start | ||
ExecStop=/var/qmail/bin/qmail stop | ExecStop=/var/qmail/bin/qmail stop | ||
ExecReload=/var/qmail/bin/qmail reload | ExecReload=/var/qmail/bin/qmail reload<br> | ||
[Install] | [Install] | ||
WantedBy=default.target | WantedBy=default.target |
Revision as of 12:57, 22 August 2025
Systemd conversion
# unlink /usr/bin/qmailctl # mv /etc/init.d/qmail /etc/init.d/vusaged /var/qmail/bin # ln -s /usr/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=multi-user.target 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