1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 01:57:02 +00:00
Files
go-inbucket/etc/ubuntu/inbucket-upstart.conf
James Hillyerd 61c6e7c2e9 Create systemd service unit file for #47
- Switch ubuntu from upstart to systemd
- Switch redhat from init.d to systemd
2017-01-05 05:29:21 +00:00

30 lines
771 B
Plaintext

# inbucket - disposable email service
#
# Inbucket is an SMTP server with a web interface for testing application
# functionality
description "inbucket - disposable email service"
author "http://jhillyerd.github.com/inbucket"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
env program=/opt/inbucket/inbucket
env config=/etc/opt/inbucket.conf
env logfile=/var/log/inbucket.log
env runas=inbucket
# Give SMTP connections time to drain
kill timeout 20
pre-start script
[ -x $program ]
[ -r $config ]
touch $logfile
chown $runas: $logfile
# Allow bind to ports under 1024
setcap 'cap_net_bind_service=+ep' $program
end script
exec start-stop-daemon --start --chuid $runas --exec $program -- -logfile $logfile $config