デフォルト設定(yum, rpm アップグレード時に書き換わる)
[root]# vim /usr/lib/systemd/system/dovecot.service
[Unit] Description = Dovecot service After = network.target [Service] Type = forking ExecStart = /usr/local/sbin/dovecot ExecStop = /usr/local/sbin/dovecot stop ExecReload = /usr/local/sbin/dovecot reload Restart = on-failure RestartSec = 10s PrivateTmp = true [Install] WantedBy = multi-user.target
ユーザー設定(優先される、設定変更はこちらに対して行う)
[root]# cp -v /usr/lib/systemd/system/dovecot.service /etc/systemd/system
・ユニットファイル登録/変更時[root]# systemctl daemon-reload
・起動/停止[root]# systemctl { start stop reload-or-restart status } dovecot
・自動起動/停止[root]# systemctl { enable disable } dovecot
・起動/自動起動を同時に行う[root]# systemctl enable --now dovecot
・停止/自動起動の停止を同時に行う[root]# systemctl disable --now dovecot