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

Collapse All | Expand All

(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/conf.d/dbmail-imapd (+19 lines)
Line 0 Link Here
1
# dbmail-imapd configuration file
2
3
# Other options for dbmail daemon
4
DBMAIL_OPTS=""
5
6
# this is the dbmail daemon executable
7
DBMAIL_PROG="dbmail-imapd"
8
DBMAIL_EXEC="/usr/sbin/${DBMAIL_PROG}"
9
10
# User to run dbmail daemon as
11
#DBMAIL_USER="dbmail"
12
DBMAIL_USER="root"
13
14
# this is where dbmail will store its pid file
15
DBMAIL_PIDFILE="/var/run/dbmail/${DBMAIL_PROG}.pid"
16
17
# this is where the config file is located
18
DBMAIL_CONFIG="/etc/dbmail.conf"
19
(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/conf.d/dbmail-lmtpd (+19 lines)
Line 0 Link Here
1
# dbmail-lmtpd configuration file
2
3
# Other options for dbmail daemon
4
DBMAIL_OPTS=""
5
6
# this is the dbmail daemon executable
7
DBMAIL_PROG="dbmail-lmtpd"
8
DBMAIL_EXEC="/usr/sbin/${DBMAIL_PROG}"
9
10
# User to run dbmail daemon as
11
#DBMAIL_USER="dbmail"
12
DBMAIL_USER="root"
13
14
# this is where dbmail will store its pid file
15
DBMAIL_PIDFILE="/var/run/dbmail/${DBMAIL_PROG}.pid"
16
17
# this is where the config file is located
18
DBMAIL_CONFIG="/etc/dbmail.conf"
19
(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/conf.d/dbmail-pop3d (+19 lines)
Line 0 Link Here
1
# dbmail-pop3d configuration file
2
3
# Other options for dbmail daemon
4
DBMAIL_OPTS=""
5
6
# this is the dbmail daemon executable
7
DBMAIL_PROG="dbmail-pop3d"
8
DBMAIL_EXEC="/usr/sbin/${DBMAIL_PROG}"
9
10
# User to run dbmail daemon as
11
#DBMAIL_USER="dbmail"
12
DBMAIL_USER="root"
13
14
# this is where dbmail will store its pid file
15
DBMAIL_PIDFILE="/var/run/dbmail/${DBMAIL_PROG}.pid"
16
17
# this is where the config file is located
18
DBMAIL_CONFIG="/etc/dbmail.conf"
19
(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/dbmail-imapd (-55 lines)
Lines 1-55 Link Here
1
#!/sbin/runscript
2
#
3
# chkconfig: - 91 35
4
# description: Starts and stops the dbmail-imapd daemon
5
#
6
7
# Where are the binaries located?
8
PROGRAM=dbmail-imapd
9
BIN_DIR=/usr/local/sbin
10
11
PID_DIR=/var/run
12
PID=pid
13
14
# Where is the dbmail.conf file located?
15
CONFIG=/etc/dbmail.conf
16
17
# opts="${opts} reload"
18
19
depend() {
20
	need net
21
	# This won't cause a hard failure if neither is installed, however.
22
	use mysql
23
	use pgsql
24
	after mta
25
}
26
27
initService() {
28
    # Avoid using root's TMPDIR
29
    unset TMPDIR
30
31
    # Check that config file exists.
32
    [ -f $CONFIG ] || exit 0
33
34
    RETVAL=0
35
}
36
37
start() {
38
	initService
39
	ebegin "Starting DBMail IMAP daemon ($PROGRAM)"
40
	    start-stop-daemon --start --quiet \
41
		--pidfile $PID_DIR/$PROGRAM.$PID \
42
		--exec $BIN_DIR/$PROGRAM \
43
		--name $PROGRAM \
44
		-- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
45
	eend $?
46
}	
47
48
stop() {
49
	initService
50
	ebegin "Stopping DBMail IMAP daemon ($PROGRAM)"
51
	    start-stop-daemon --stop --quiet --retry 5 \
52
		--pidfile $PID_DIR/$PROGRAM.$PID
53
	eend $?
54
}	
55
(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/dbmail-lmtpd (-55 lines)
Lines 1-55 Link Here
1
#!/sbin/runscript
2
#
3
# chkconfig: - 91 35
4
# description: Starts and stops the dbmail-lmtpd daemon
5
#
6
7
# Where are the binaries located?
8
PROGRAM=dbmail-lmtpd
9
BIN_DIR=/usr/local/sbin
10
11
PID_DIR=/var/run
12
PID=pid
13
14
# Where is the dbmail.conf file located?
15
CONFIG=/etc/dbmail.conf
16
17
# opts="${opts} reload"
18
19
depend() {
20
	need net
21
	# This won't cause a hard failure if neither is installed, however.
22
	use mysql
23
	use pgsql
24
	after mta
25
}
26
27
initService() {
28
    # Avoid using root's TMPDIR
29
    unset TMPDIR
30
31
    # Check that config file exists.
32
    [ -f $CONFIG ] || exit 0
33
34
    RETVAL=0
35
}
36
37
start() {
38
	initService
39
	ebegin "Starting DBMail LMTP daemon ($PROGRAM)"
40
	    start-stop-daemon --start --quiet \
41
		--pidfile $PID_DIR/$PROGRAM.$PID \
42
		--exec $BIN_DIR/$PROGRAM \
43
		--name $PROGRAM \
44
		-- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
45
	eend $?
46
}	
47
48
stop() {
49
	initService
50
	ebegin "Stopping DBMail LMTP daemon ($PROGRAM)"
51
	    start-stop-daemon --stop --quiet --retry 5 \
52
		--pidfile $PID_DIR/$PROGRAM.$PID
53
	eend $?
54
}	
55
(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/dbmail-pop3d (-55 lines)
Lines 1-55 Link Here
1
#!/sbin/runscript
2
#
3
# chkconfig: - 91 35
4
# description: Starts and stops the dbmail-pop3d daemon
5
#
6
7
# Where are the binaries located?
8
PROGRAM=dbmail-pop3d
9
BIN_DIR=/usr/local/sbin
10
11
PID_DIR=/var/run
12
PID=pid
13
14
# Where is the dbmail.conf file located?
15
CONFIG=/etc/dbmail.conf
16
17
# opts="${opts} reload"
18
19
depend() {
20
	need net
21
	# This won't cause a hard failure if neither is installed, however.
22
	use mysql
23
	use pgsql
24
	after mta
25
}
26
27
initService() {
28
    # Avoid using root's TMPDIR
29
    unset TMPDIR
30
31
    # Check that config file exists.
32
    [ -f $CONFIG ] || exit 0
33
34
    RETVAL=0
35
}
36
37
start() {
38
	initService
39
	ebegin "Starting DBMail POP3 daemon ($PROGRAM)"
40
	    start-stop-daemon --start --quiet \
41
		--pidfile $PID_DIR/$PROGRAM.$PID \
42
		--exec $BIN_DIR/$PROGRAM \
43
		--name $PROGRAM \
44
		-- -f $CONFIG -p $PID_DIR/$PROGRAM.$PID 2>&1
45
	eend $?
46
}	
47
48
stop() {
49
	initService
50
	ebegin "Stopping DBMail POP3 daemon ($PROGRAM)"
51
	    start-stop-daemon --stop --quiet --retry 5 \
52
		--pidfile $PID_DIR/$PROGRAM.$PID
53
	eend $?
54
}	
55
(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/init.d/dbmail-imapd (+42 lines)
Line 0 Link Here
1
#!/sbin/runscript
2
3
depend() {
4
	need net
5
	# This won't cause a hard failure if neither is installed, however.
6
	use mysql
7
	use pgsql
8
	after mta
9
}
10
11
start() {
12
	ebegin "Performing dbmail checks"
13
	dbmail-util -a >/dev/null 2>&1
14
	ret=$?
15
	if [ $ret -ne 0 ]; then
16
		eerror "There was a problem performing the dbmail checks"
17
		eerror "Run dbmail-util -a to determine the problem"
18
		return 1
19
	fi
20
	
21
	if [ ! -f $DBMAIL_CONFIG ]; then
22
		eerror "configuration file $DBMAIL_CONFIG Not found"
23
		return 1
24
	fi
25
	
26
	ebegin "Starting DBMail daemon ($DBMAIL_PROG)"
27
	start-stop-daemon --start --quiet \
28
		--chuid $DBMAIL_USER \
29
		--pidfile $DBMAIL_PIDFILE \
30
		--exec $DBMAIL_EXEC \
31
		--name $DBMAIL_PROG \
32
		-- -f $DBMAIL_CONFIG -p $DBMAIL_PIDFILE $DBMAIL_OPTS 2>&1
33
	eend $?
34
}	
35
36
stop() {
37
	ebegin "Stopping DBMail daemon ($DBMAIL_PROG)"
38
	    start-stop-daemon --stop --quiet --retry 5 \
39
		--chuid $DBMAIL_USER \
40
		--pidfile $DBMAIL_PIDFILE
41
	eend $?
42
}	
(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/init.d/dbmail-lmtpd (+42 lines)
Line 0 Link Here
1
#!/sbin/runscript
2
3
depend() {
4
	need net
5
	# This won't cause a hard failure if neither is installed, however.
6
	use mysql
7
	use pgsql
8
	after mta
9
}
10
11
start() {
12
	ebegin "Performing dbmail checks"
13
	dbmail-util -a >/dev/null 2>&1
14
	ret=$?
15
	if [ $ret -ne 0 ]; then
16
		eerror "There was a problem performing the dbmail checks"
17
		eerror "Run dbmail-util -a to determine the problem"
18
		return 1
19
	fi
20
	
21
	if [ ! -f $DBMAIL_CONFIG ]; then
22
		eerror "configuration file $DBMAIL_CONFIG Not found"
23
		return 1
24
	fi
25
	
26
	ebegin "Starting DBMail daemon ($DBMAIL_PROG)"
27
	start-stop-daemon --start --quiet \
28
		--chuid $DBMAIL_USER \
29
		--pidfile $DBMAIL_PIDFILE \
30
		--exec $DBMAIL_EXEC \
31
		--name $DBMAIL_PROG \
32
		-- -f $DBMAIL_CONFIG -p $DBMAIL_PIDFILE $DBMAIL_OPTS 2>&1
33
	eend $?
34
}	
35
36
stop() {
37
	ebegin "Stopping DBMail daemon ($DBMAIL_PROG)"
38
	    start-stop-daemon --stop --quiet --retry 5 \
39
		--chuid $DBMAIL_USER \
40
		--pidfile $DBMAIL_PIDFILE
41
	eend $?
42
}	
(-)dbmail-2.0.1.org/contrib/startup-scripts/gentoo/init.d/dbmail-pop3d (+42 lines)
Line 0 Link Here
1
#!/sbin/runscript
2
3
depend() {
4
	need net
5
	# This won't cause a hard failure if neither is installed, however.
6
	use mysql
7
	use pgsql
8
	after mta
9
}
10
11
start() {
12
	ebegin "Performing dbmail checks"
13
	dbmail-util -a >/dev/null 2>&1
14
	ret=$?
15
	if [ $ret -ne 0 ]; then
16
		eerror "There was a problem performing the dbmail checks"
17
		eerror "Run dbmail-util -a to determine the problem"
18
		return 1
19
	fi
20
	
21
	if [ ! -f $DBMAIL_CONFIG ]; then
22
		eerror "configuration file $DBMAIL_CONFIG Not found"
23
		return 1
24
	fi
25
	
26
	ebegin "Starting DBMail daemon ($DBMAIL_PROG)"
27
	start-stop-daemon --start --quiet \
28
		--chuid $DBMAIL_USER \
29
		--pidfile $DBMAIL_PIDFILE \
30
		--exec $DBMAIL_EXEC \
31
		--name $DBMAIL_PROG \
32
		-- -f $DBMAIL_CONFIG -p $DBMAIL_PIDFILE $DBMAIL_OPTS 2>&1
33
	eend $?
34
}	
35
36
stop() {
37
	ebegin "Stopping DBMail daemon ($DBMAIL_PROG)"
38
	    start-stop-daemon --stop --quiet --retry 5 \
39
		--chuid $DBMAIL_USER \
40
		--pidfile $DBMAIL_PIDFILE
41
	eend $?
42
}	

Return to bug 22331