mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
Ubuntu etc files
- Point RedHat README to website - Add ubuntu upstart, logrotate configs
This commit is contained in:
@@ -1,35 +1,3 @@
|
||||
To setup on RedHat 6 or one of its clones:
|
||||
Please see the RedHat installation guide on our website:
|
||||
|
||||
# Create a service account for the daemon to run as
|
||||
useradd -r -m inbucket
|
||||
|
||||
# Create datastore directory
|
||||
mkdir /var/opt/inbucket
|
||||
chown inbucket: /var/opt/inbucket
|
||||
|
||||
# Copy logrotate config into place
|
||||
cp inbucket.logrotate /etc/logrotate.d/logrotate
|
||||
chown root: /etc/logrotate.d/logrotate
|
||||
|
||||
# Copy init script into place and activate
|
||||
cp inbucket-init.sh /etc/init.d
|
||||
chown root: /etc/init.d/inbucket
|
||||
chmod 755 /etc/init.d/inbucket
|
||||
chkconfig --add inbucket
|
||||
|
||||
# Copy the sample config into place
|
||||
# NOTE: there is a "cap" command in the init script that allows inbucket
|
||||
# to listen on privileged ports without running as root.
|
||||
cp ../unix-sample.conf /etc/opt/inbucket.conf
|
||||
chown root: /etc/opt/inbucket.conf
|
||||
|
||||
(confirm /etc/opt/inbucket.conf is to your liking)
|
||||
|
||||
# Start the daemon
|
||||
service inbucket start
|
||||
|
||||
# Confirm it stayed running
|
||||
service inbucket status
|
||||
|
||||
# Check inbucket's startup messages
|
||||
less /var/log/inbucket.log
|
||||
http://jhillyerd.github.com/inbucket/installation/redhat.html
|
||||
|
||||
3
etc/ubuntu-12/README
Normal file
3
etc/ubuntu-12/README
Normal file
@@ -0,0 +1,3 @@
|
||||
Please see the Ubuntu installation guide on our website:
|
||||
|
||||
http://jhillyerd.github.com/inbucket/installation/ubuntu.html
|
||||
29
etc/ubuntu-12/inbucket-upstart.conf
Normal file
29
etc/ubuntu-12/inbucket-upstart.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
# 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
|
||||
8
etc/ubuntu-12/inbucket.logrotate
Normal file
8
etc/ubuntu-12/inbucket.logrotate
Normal file
@@ -0,0 +1,8 @@
|
||||
/var/log/inbucket.log {
|
||||
missingok
|
||||
notifempty
|
||||
create 0644 inbucket inbucket
|
||||
postrotate
|
||||
[ -x /sbin/reload ] && /sbin/reload inbucket >/dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
Reference in New Issue
Block a user