SOURCES: policyd.conf, policyd.cron, policyd.init - policyd.init: ...
hns
hns at pld-linux.org
Tue Nov 15 13:59:02 CET 2005
Author: hns Date: Tue Nov 15 12:59:02 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- policyd.init: show howto setup new policyd install (``init'' param)
- policyd.cron: move this to policyd.init (``cron'' param)
- work in progress..
---- Files affected:
SOURCES:
policyd.conf (1.2 -> 1.3) , policyd.cron (1.1 -> 1.2) , policyd.init (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/policyd.conf
diff -u SOURCES/policyd.conf:1.2 SOURCES/policyd.conf:1.3
--- SOURCES/policyd.conf:1.2 Fri Oct 28 11:56:22 2005
+++ SOURCES/policyd.conf Tue Nov 15 13:58:56 2005
@@ -470,7 +470,7 @@
# 3=192.168.0 <- default/recommended
# 4=192.168.0.1
#
-GREYLIST_HOSTADDR=4 <- default/recommended
+GREYLIST_HOSTADDR=3 <- default/recommended
#
# train database: default: off
================================================================
Index: SOURCES/policyd.cron
diff -u SOURCES/policyd.cron:1.1 SOURCES/policyd.cron:1.2
--- SOURCES/policyd.cron:1.1 Fri Oct 28 10:29:43 2005
+++ SOURCES/policyd.cron Tue Nov 15 13:58:57 2005
@@ -1,14 +1,3 @@
#!/bin/sh
-if [ -r /etc/sysconfig/policyd ]; then
- . /etc/sysconfig/policyd
-else
- # set default file
- POLICYD_CONF="/etc/policyd/policyd.conf"
-fi
-
-if [ ! -r /var/run/policyd.lck -a -r "${POLICYD_CONF}" ]; then
- touch /var/run/policyd.lck
- /usr/lib/policyd/cleanup -c "${POLICYD_CONF}"
- rm -f /var/run/policyd.lck
-fi
+exec /etc/rc.d/init.d/policyd cron
================================================================
Index: SOURCES/policyd.init
diff -u SOURCES/policyd.init:1.1 SOURCES/policyd.init:1.2
--- SOURCES/policyd.init:1.1 Fri Oct 28 10:29:43 2005
+++ SOURCES/policyd.init Tue Nov 15 13:58:57 2005
@@ -56,12 +56,7 @@
msg_not_running PolicyD
fi
;;
- restart)
- $0 stop
- $0 start
- exit $?
- ;;
- reload|force-reload)
+ restart|reload|force-reload)
$0 stop
$0 start
exit $?
@@ -70,7 +65,7 @@
status policyd
exit $?
;;
- cleanup)
+ cleanup|cron)
if [ -r /var/run/policyd.lck ]; then
echo "PolicyD cleanup process already running." 1>&2
RETVAL=1
@@ -84,8 +79,39 @@
rm -f /var/run/policyd.lck
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 ''
+ ;;
*)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|cron|init|status}"
exit 3
esac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/policyd.conf?r1=1.2&r2=1.3&f=u
http://cvs.pld-linux.org/SOURCES/policyd.cron?r1=1.1&r2=1.2&f=u
http://cvs.pld-linux.org/SOURCES/policyd.init?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list