mirror of
https://git.freebsd.org/ports.git
synced 2025-06-16 18:20:33 -04:00
Virtual-domain capable POP3 server supporting MySQL auth PR: 29265 Submitted by: Chris Elsworth <chris@shagged.org>
45 lines
907 B
Bash
45 lines
907 B
Bash
#!/bin/sh
|
|
#
|
|
# tpop3d:
|
|
# Init script for starting/stopping tpop3d.
|
|
#
|
|
# Copyright (c) 2001 Chris Lightfoot. All rights reserved.
|
|
# Portability enhanced by Chris Elsworth, July 2001
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
|
|
echo "$0: Cannot determine the PREFIX" >&2
|
|
exit 1
|
|
fi
|
|
|
|
DAEMON=$PREFIX/sbin/tpop3d
|
|
|
|
[ -f $DAEMON ] || exit 0
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
# Start daemons.
|
|
$DAEMON -f $PREFIX/etc/tpop3d.conf -p /var/run/tpop3d.pid \
|
|
&& echo -n " tpop3d"
|
|
;;
|
|
stop)
|
|
# Stop daemons.
|
|
[ -r /var/run/tpop3d.pid ] && kill `cat /var/run/tpop3d.pid` \
|
|
&& echo -n " tpop3d"
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
reload)
|
|
[ -r /var/run/tpop3d.pid ] && kill -HUP `cat /var/run/tpop3d.pid`
|
|
;;
|
|
*)
|
|
echo "Usage: `basename $0` {start|stop|restart|reload}"
|
|
exit 1
|
|
esac
|
|
|
|
exit 0
|