Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 375565 | Differences between
and this patch

Collapse All | Expand All

(-)etc/init.d/pure-ftpd.orig (-14 / +15 lines)
Lines 5-10 Link Here
5
5
6
ftpd_pidfile="/var/run/pure-ftpd.pid"
6
ftpd_pidfile="/var/run/pure-ftpd.pid"
7
script_pidfile="/var/run/pure-uploadscript.pid"
7
script_pidfile="/var/run/pure-uploadscript.pid"
8
authd_pidfile="/var/run/pure-authd.pid"
8
ftpd_rundir="/var/lib/run/pure-ftpd"
9
ftpd_rundir="/var/lib/run/pure-ftpd"
9
10
10
depend() {
11
depend() {
Lines 35-58 Link Here
35
	fi
36
	fi
36
37
37
	UPSCRIPT=""
38
	UPSCRIPT=""
38
	OKNODO=""
39
	if [ -n "$UPLOADSCRIPT" ] ; then
39
	if [ -n "$UPLOADSCRIPT" ] ; then
40
		UPSCRIPT="--uploadscript"
40
		UPSCRIPT="--uploadscript"
41
		OKNODO="--oknodo"
41
		ebegin "Starting Pure-FTPd upload script"
42
		start-stop-daemon --start --quiet --make-pidfile --pidfile ${script_pidfile} --exec /usr/sbin/pure-uploadscript --background ${WAIT} -- -r $UPLOADSCRIPT
43
		eend $?
42
	fi
44
	fi
45
	if [ -n "$EXTAUTH_SCRIPT" ] ; then
46
		ebegin "Starting Pure-FTPd extauth daemon"
47
		start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${authd_pidfile} --exec /usr/sbin/pure-authd -- -s $EXTAUTH_SOCK -r $EXTAUTH_SCRIPT 
48
		eend $?
49
        fi
43
	ebegin "Starting Pure-FTPd"
50
	ebegin "Starting Pure-FTPd"
44
	start-stop-daemon --start --quiet --pidfile ${ftpd_pidfile} $OKNODO --exec /usr/sbin/pure-ftpd ${WAIT} -- --pidfile ${ftpd_pidfile} $SERVER $MAX_CONN $MAX_CONN_IP $DAEMON $DISK_FULL $USE_NAT $AUTH $LOG $TIMEOUT $CHARCONV $MISC_OTHER $UPSCRIPT
51
	start-stop-daemon --start --quiet --pidfile ${ftpd_pidfile} $OKNODO --exec /usr/sbin/pure-ftpd ${WAIT} -- --pidfile ${ftpd_pidfile} $SERVER $MAX_CONN $MAX_CONN_IP $DAEMON $DISK_FULL $USE_NAT $AUTH $LOG $TIMEOUT $CHARCONV $MISC_OTHER $UPSCRIPT
45
	result=$?
52
	eend $?
46
	if [ $result -ne 0 ] ; then
47
		eend 1 "Could not launch Pure-FTPd"
48
	else
49
		eend $result
50
		if [ -n "$UPLOADSCRIPT" ] ; then
51
			ebegin "Starting Pure-FTPd upload script"
52
			start-stop-daemon --start --quiet --make-pidfile --pidfile ${script_pidfile} --exec /usr/sbin/pure-uploadscript --background ${WAIT} -- -r $UPLOADSCRIPT
53
			eend $?
54
		fi
55
	fi
56
}
53
}
57
54
58
stop() {
55
stop() {
Lines 64-70 Link Here
64
		start-stop-daemon --stop --retry 20 --quiet --pidfile ${script_pidfile}
61
		start-stop-daemon --stop --retry 20 --quiet --pidfile ${script_pidfile}
65
		eend $?
62
		eend $?
66
	fi
63
	fi
67
64
	if [ -n "$EXTAUTH_SCRIPT" ] ; then
65
		ebegin "Stopping Pure-FTPd extauth daemon"
66
		start-stop-daemon --stop --retry 20 --quiet --pidfile ${authd_pidfile}
67
		eend $?
68
	fi
68
	if ${TMPFS_MOUNT:-false} && mount | grep -q ${ftpd_rundir} ; then
69
	if ${TMPFS_MOUNT:-false} && mount | grep -q ${ftpd_rundir} ; then
69
		umount ${ftpd_rundir} >/dev/null 2>&1
70
		umount ${ftpd_rundir} >/dev/null 2>&1
70
	fi
71
	fi

Return to bug 375565