SOURCES: policyd.init - use heredoc

glen glen at pld-linux.org
Tue Dec 26 21:07:37 CET 2006


Author: glen                         Date: Tue Dec 26 20:07:37 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use heredoc

---- Files affected:
SOURCES:
   policyd.init (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SOURCES/policyd.init
diff -u SOURCES/policyd.init:1.6 SOURCES/policyd.init:1.7
--- SOURCES/policyd.init:1.6	Tue Dec 26 21:01:37 2006
+++ SOURCES/policyd.init	Tue Dec 26 21:07:32 2006
@@ -55,6 +55,37 @@
 	fi
 }
 
+init() {
+	cat <<-'EOF'
+
+	You must login as mysql administrator and setup policyd user as follows:
+
+	mysql> GRANT ALL ON policyd.* TO policyd at localhost IDENTIFIED BY 'secret_password';
+	mysql> GRANT USAGE ON *.* TO policyd at localhost IDENTIFIED BY 'secret_password';
+
+	Next create database structure:
+
+	$ zcat /usr/share/doc/policyd-*/DATABASE.mysql.gz | mysql -p -u policyd
+
+	After database is fully configured edit ``policyd.conf'' and set correct
+	mysql username and password. Example configuration for postfix from
+	``main.cf'' file:
+
+	smtpd_recipient_restrictions =
+		permit_mynetworks
+		permit_sasl_authenticated
+		reject_unauth_destination
+		reject_unlisted_recipient
+		check_policy_service inet:127.0.0.1:10031
+
+
+	Start policyd daemon and then reload postfix configuration:
+
+	# service policyd start
+	# postfix reload
+EOF
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -87,35 +118,7 @@
 	fi
 	;;
   init)
-	echo ''
-	echo 'You must login as mysql administrator and setup policyd user as follows:'
-	echo ''
-	echo 'mysql> GRANT ALL ON policyd.* TO policyd at localhost IDENTIFIED BY '\''secret_password'\'';'
-	echo 'mysql> GRANT USAGE ON *.* TO policyd at localhost IDENTIFIED BY '\''secret_password'\'';'
-	echo ''
-	echo ''
-	echo 'Next create database structure:'
-	echo ''
-	echo '$ zcat /usr/share/doc/policyd-*/DATABASE.mysql.gz | mysql -p -u policyd'
-	echo ''
-	echo ''
-	echo 'After database is fully configured edit ``policyd.conf'\'\'' and set correct'
-	echo 'mysql username and password. Example configuration for postfix from'
-	echo '``main.cf'\'\'' file:'
-	echo ''
-	echo 'smtpd_recipient_restrictions ='
-	echo '	permit_mynetworks'
-	echo '	permit_sasl_authenticated'
-	echo '	reject_unauth_destination'
-	echo '	reject_unlisted_recipient'
-	echo '	check_policy_service inet:127.0.0.1:10031'
-	echo ''
-	echo ''
-	echo 'Start policyd daemon and then reload postfix configuration:'
-	echo ''
-	echo '# /etc/rc.d/init.d/policyd start'
-	echo '# postfix reload'
-	echo ''
+  	init
 	;;
   *)
 	msg_usage "$0 {start|stop|restart|force-reload|cron|init|status}"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/policyd.init?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list