1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

debian: Use goreleaser to generate .deb package for #89

This commit is contained in:
James Hillyerd
2018-03-25 18:23:25 -07:00
parent 7ab9ea92ad
commit 0055b84916
7 changed files with 57 additions and 63 deletions

View File

@@ -0,0 +1,33 @@
[Unit]
Description=Inbucket Disposable Email Service
After=network.target
[Service]
Type=simple
User=daemon
Group=daemon
PermissionsStartOnly=true
Environment=INBUCKET_LOGLEVEL=WARN
Environment=INBUCKET_SMTP_ADDR=0.0.0.0:2500
Environment=INBUCKET_POP3_ADDR=0.0.0.0:1100
Environment=INBUCKET_WEB_ADDR=0.0.0.0:9000
Environment=INBUCKET_WEB_UIDIR=/usr/local/share/inbucket/ui
Environment=INBUCKET_WEB_GREETINGFILE=/etc/inbucket/greeting.html
Environment=INBUCKET_STORAGE_TYPE=file
Environment=INBUCKET_STORAGE_PARAMS=path:/var/local/inbucket
# Uncomment line below to use low numbered ports
#ExecStartPre=/sbin/setcap 'cap_net_bind_service=+ep' /usr/local/bin/inbucket
ExecStartPre=/bin/mkdir -p /var/local/inbucket
ExecStartPre=/bin/chown daemon:daemon /var/local/inbucket
ExecStart=/usr/local/bin/inbucket
# Give SMTP connections time to drain
TimeoutStopSec=20
KillMode=mixed
[Install]
WantedBy=multi-user.target

View File

@@ -1,3 +0,0 @@
Please see the Ubuntu installation guide on our website:
http://www.inbucket.org/installation/ubuntu.html

View File

@@ -1,29 +0,0 @@
# 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

View File

@@ -1,8 +0,0 @@
/var/log/inbucket.log {
missingok
notifempty
create 0644 inbucket inbucket
postrotate
[ -x /bin/systemctl ] && /bin/systemctl reload inbucket >/dev/null 2>&1 || true
endscript
}

View File

@@ -1,20 +0,0 @@
[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