Browse Source

Updated startup script to run postfix in foreground

master
Fábio Kaiser Rauber 3 years ago
parent
commit
b36978bbbe
  1. 26
      conf/postfix-service.sh

26
conf/postfix-service.sh

@ -38,19 +38,7 @@ function serviceStart {
serviceConf serviceConf
# Actually run Postfix # Actually run Postfix
log "[ Starting Postfix... ]" log "[ Starting Postfix... ]"
nohup /usr/sbin/postfix start-fg & /usr/sbin/postfix start-fg
echo $! > /var/run/postfix.pid
}
function serviceStop {
log "[ Stopping Postfix... ]"
kill `cat /var/run/postfix.pid`
}
function serviceRestart {
log "[ Restarting Postfix... ]"
serviceStop
serviceStart
} }
export DOMAIN=${DOMAIN:-"localhost"} export DOMAIN=${DOMAIN:-"localhost"}
@ -59,16 +47,4 @@ export MESSAGE_SIZE_LIMIT=${MESSAGE_SIZE_LIMIT:-"50000000"}
export RELAYNETS=${RELAYNETS:-""} export RELAYNETS=${RELAYNETS:-""}
export RELAYHOST=${RELAYHOST:-""} export RELAYHOST=${RELAYHOST:-""}
case "$1" in
"start")
serviceStart &>> /proc/1/fd/1 serviceStart &>> /proc/1/fd/1
;;
"stop")
serviceStop &>> /proc/1/fd/1
;;
"restart")
serviceRestart &>> /proc/1/fd/1
;;
*) echo "Usage: $0 restart|start|stop"
;;
esac
Loading…
Cancel
Save