diff --git a/CHANGELOG.md b/CHANGELOG.md index 00f9da8..f3c7d1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Removed legacy `integral` theme, as most new features only in `bootstrap` - Removed old RESTful APIs, must use `/api/v1` base URI now - Allow increased local-part length of 128 chars for Mailgun +- RedHat and Ubuntu now use systemd instead of legacy init systems [1.1.0] - 2016-09-03 -------------------- diff --git a/etc/redhat-el6/README b/etc/redhat/README similarity index 100% rename from etc/redhat-el6/README rename to etc/redhat/README diff --git a/etc/redhat-el6/httpd-vhost.conf b/etc/redhat/httpd-vhost.conf similarity index 100% rename from etc/redhat-el6/httpd-vhost.conf rename to etc/redhat/httpd-vhost.conf diff --git a/etc/redhat-el6/inbucket-init.sh b/etc/redhat/inbucket-init.sh similarity index 100% rename from etc/redhat-el6/inbucket-init.sh rename to etc/redhat/inbucket-init.sh diff --git a/etc/ubuntu-12/inbucket.logrotate b/etc/redhat/inbucket.logrotate similarity index 56% rename from etc/ubuntu-12/inbucket.logrotate rename to etc/redhat/inbucket.logrotate index 9e02eef..04ec439 100644 --- a/etc/ubuntu-12/inbucket.logrotate +++ b/etc/redhat/inbucket.logrotate @@ -3,6 +3,6 @@ notifempty create 0644 inbucket inbucket postrotate - [ -x /sbin/reload ] && /sbin/reload inbucket >/dev/null 2>&1 || true + [ -x /bin/systemctl ] && /bin/systemctl reload inbucket >/dev/null 2>&1 || true endscript } diff --git a/etc/redhat/inbucket.service b/etc/redhat/inbucket.service new file mode 100644 index 0000000..5480a45 --- /dev/null +++ b/etc/redhat/inbucket.service @@ -0,0 +1,20 @@ +[Unit] +Description=Inbucket Disposable Email Service +After=network.target + +[Service] +Type=simple +User=inbucket +Group=inbucket + +ExecStart=/opt/inbucket/inbucket -logfile /var/log/inbucket.log /etc/opt/inbucket.conf + +# Re-open log file after rotation +ExecReload=/bin/kill -HUP $MAINPID + +# Give SMTP connections time to drain +TimeoutStopSec=20 +KillMode=mixed + +[Install] +WantedBy=multi-user.target diff --git a/etc/ubuntu-12/README b/etc/ubuntu/README similarity index 100% rename from etc/ubuntu-12/README rename to etc/ubuntu/README diff --git a/etc/ubuntu-12/inbucket-upstart.conf b/etc/ubuntu/inbucket-upstart.conf similarity index 100% rename from etc/ubuntu-12/inbucket-upstart.conf rename to etc/ubuntu/inbucket-upstart.conf diff --git a/etc/redhat-el6/inbucket.logrotate b/etc/ubuntu/inbucket.logrotate similarity index 55% rename from etc/redhat-el6/inbucket.logrotate rename to etc/ubuntu/inbucket.logrotate index 40f388f..04ec439 100644 --- a/etc/redhat-el6/inbucket.logrotate +++ b/etc/ubuntu/inbucket.logrotate @@ -3,6 +3,6 @@ notifempty create 0644 inbucket inbucket postrotate - [ -e /etc/init.d/inbucket ] && /etc/init.d/inbucket reload >/dev/null 2>&1 || true + [ -x /bin/systemctl ] && /bin/systemctl reload inbucket >/dev/null 2>&1 || true endscript } diff --git a/etc/ubuntu/inbucket.service b/etc/ubuntu/inbucket.service new file mode 100644 index 0000000..5480a45 --- /dev/null +++ b/etc/ubuntu/inbucket.service @@ -0,0 +1,20 @@ +[Unit] +Description=Inbucket Disposable Email Service +After=network.target + +[Service] +Type=simple +User=inbucket +Group=inbucket + +ExecStart=/opt/inbucket/inbucket -logfile /var/log/inbucket.log /etc/opt/inbucket.conf + +# Re-open log file after rotation +ExecReload=/bin/kill -HUP $MAINPID + +# Give SMTP connections time to drain +TimeoutStopSec=20 +KillMode=mixed + +[Install] +WantedBy=multi-user.target