First check in
This commit is contained in:
5
SNAP/README
Normal file
5
SNAP/README
Normal file
@@ -0,0 +1,5 @@
|
||||
This is the directory where the manifest, snapinfo,
|
||||
and files.tar.gz files will be created. It is also
|
||||
where the usher file should be placed if it is
|
||||
required by the package. Any other files that need
|
||||
to be included could also be placed here.
|
||||
52
SNAP/postfix.init
Executable file
52
SNAP/postfix.init
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: postfix
|
||||
# Required-Start: $syslog $local_fs $network
|
||||
# Should-Start: $remote_fs openldap saslauthd
|
||||
# Required-Stop: $network
|
||||
# Should-Stop: $remote_fs openldap saslauthd
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Postfix MTA
|
||||
# Description: Controls the Postfix Mail Transfer Agent
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
BINFILE=/usr/lib/postfix/master
|
||||
PIDFILE=/var/spool/postfix/pid/master.pid
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_init_msg "Starting Postfix"
|
||||
start_daemon -p "${PIDFILE}" /usr/sbin/postfix start 2> /dev/null && \
|
||||
log_success_msg || log_failure_msg
|
||||
;;
|
||||
stop)
|
||||
log_init_msg "Stopping Postfix"
|
||||
killproc -p "${PIDFILE}" ${BINFILE} && log_success_msg || log_failure_msg
|
||||
;;
|
||||
reload)
|
||||
log_init_msg "Reloading Postfix"
|
||||
killproc -p "${PIDFILE}" ${BINFILE} -HUP && log_success_msg || \
|
||||
log_failure_msg
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
pid=$(pidofproc -p "$PIDFILE" "$BINFILE");
|
||||
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "postfix is not runing"
|
||||
else
|
||||
echo "postfix running with PID: $pid"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
41
SNAP/usher
Executable file
41
SNAP/usher
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case $1 in
|
||||
preinst)
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
getent group postfix 2>&1 > /dev/null || groupadd -g 32 postfix
|
||||
getent group postdrop 2>&1 > /dev/null || groupadd -g 33 postdrop
|
||||
getent passwd postfix 2>&1 > /dev/null || useradd -c "Postfix Daemon" \
|
||||
-g postfix -d /dev/null -s /bin/false -u 32 postfix
|
||||
|
||||
if [ ! -f /etc/aliases ]; then
|
||||
printf "postmaster: root\nMAILER-DAEMON: root" > /etc/aliases
|
||||
newaliases
|
||||
fi
|
||||
|
||||
for f in /usr/share/postfix/etc/*; do
|
||||
if [ ! -f /etc/postfix/`basename $f` ]; then
|
||||
cp -a $f /etc/postfix
|
||||
fi
|
||||
done
|
||||
|
||||
chown -R postfix.postdrop /var/spool/postfix/* /var/lib/postfix
|
||||
chown root.root /var/spool/postfix/pid
|
||||
chgrp postdrop /usr/sbin/postqueue \
|
||||
/usr/sbin/postdrop \
|
||||
/var/spool/postfix/public \
|
||||
/var/spool/postfix/maildrop
|
||||
chmod 2555 /usr/sbin/postqueue \
|
||||
/usr/sbin/postdrop
|
||||
;;
|
||||
prerm)
|
||||
exit 0
|
||||
;;
|
||||
postrm)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user