summaryrefslogtreecommitdiffstats
path: root/debian/patches/09_quiet_startup.diff
blob: f87388e2084deac0e0520ecc0287ae4a920698d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Index: postfix-dev/conf/postfix-script
===================================================================
--- postfix-dev.orig/conf/postfix-script	2019-03-01 11:19:36.053713674 -0500
+++ postfix-dev/conf/postfix-script	2019-03-01 11:19:36.049713674 -0500
@@ -47,6 +47,13 @@
 FATAL="$LOGGER -p fatal"
 PANIC="$LOGGER -p panic"
 
+if [ "X${1#quiet-}" != "X${1}" ]; then
+    INFO=:
+    x=${1#quiet-}
+    shift
+    set -- $x "$@"
+fi
+
 umask 022
 SHELL=/bin/sh
 
@@ -122,6 +129,20 @@
 	echo "Stop postfix"
 	;;
 
+quick-start)
+
+       $daemon_directory/master -t 2>/dev/null || {
+               $FATAL the Postfix mail system is already running
+               exit 1
+       }
+       $daemon_directory/postfix-script quick-check || {
+               $FATAL Postfix integrity check failed!
+               exit 1
+       }
+       $INFO starting the Postfix mail system
+       $daemon_directory/master &
+       ;;
+
 start|start-fg)
 
 	$daemon_directory/master -t 2>/dev/null || {
@@ -189,7 +210,7 @@
 
 	$daemon_directory/master -t 2>/dev/null && {
 		$FATAL the Postfix mail system is not running
-		exit 1
+		exit 0
 	}
 	$INFO stopping the Postfix mail system
 	kill `sed 1q pid/master.pid`
@@ -208,7 +229,7 @@
 
 	$daemon_directory/master -t 2>/dev/null && {
 		$FATAL the Postfix mail system is not running
-		exit 1
+		exit 0
 	}
 	$INFO aborting the Postfix mail system
 	kill `sed 1q pid/master.pid`
@@ -252,12 +273,11 @@
 	exit 0
 	;;
 
-
-check-fatal)
+quick-check)
 	# This command is NOT part of the public interface.
 
 	$SHELL $daemon_directory/post-install create-missing || {
-		$FATAL unable to create missing queue directories
+		$WARN unable to create missing queue directories
 		exit 1
 	}
 
@@ -267,6 +287,13 @@
 		$FATAL no $config_directory/master.cf file found
 		exit 1
 	}
+	exit 0
+	;;
+
+check-fatal)
+	# This command is NOT part of the public interface.
+
+	$daemon_directory/postfix-script quick-check
 
 	maillog_file=`$command_directory/postconf -h maillog_file` || {
 		$FATAL cannot execute $command_directory/postconf!