|
@ -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 |
|
|
serviceStart &>> /proc/1/fd/1 |
|
|
"start") |
|
|
|
|
|
serviceStart &>> /proc/1/fd/1 |
|
|
|
|
|
;; |
|
|
|
|
|
"stop") |
|
|
|
|
|
serviceStop &>> /proc/1/fd/1 |
|
|
|
|
|
;; |
|
|
|
|
|
"restart") |
|
|
|
|
|
serviceRestart &>> /proc/1/fd/1 |
|
|
|
|
|
;; |
|
|
|
|
|
*) echo "Usage: $0 restart|start|stop" |
|
|
|
|
|
;; |
|
|
|
|
|
esac |
|
|
|
|
|