scripts/archive/archives/pop3s-restart

7 lines
279 B
Text
Executable file

#/bin/sh
PIFILE="/var/run/stunnel.tunnel-pop.pid"
OPTIONS="-d 995 -r 110 tunnel-pop -p /etc/ssl/certs/stunnel-ptt.pem"
if [ $(netstat -l --tcp | grep -c ' \*:pop3s') -eq 0 ]; then
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec /usr/sbin/stunnel -- $OPTIONS ;
fi