Lines 32-62
Link Here
|
32 |
echo "Please answer yes or no." |
33 |
echo "Please answer yes or no." |
33 |
done |
34 |
done |
34 |
} |
35 |
} |
35 |
|
|
|
36 |
if [ ! -e ${PKG_PREFIX}/etc/mail/spamassassin/v320.pre ]; then |
37 |
echo "***********************************************" |
38 |
echo "*__ ___ ____ _ _ ___ _ _ ____ *" |
39 |
echo "*\ \ / / \ | _ \| \ | |_ _| \ | |/ ___|*" |
40 |
echo "* \ \ /\ / / _ \ | |_) | \| || || \| | | _ *" |
41 |
echo "* \ V V / ___ \| _ <| |\ || || |\ | |_| |*" |
42 |
echo "* \_/\_/_/ \_\_| \_\_| \_|___|_| \_|\____|*" |
43 |
echo "* *" |
44 |
echo "*You must install rules before starting spamd!*" |
45 |
echo "***********************************************" |
46 |
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then |
47 |
sleep 10; |
48 |
fi |
49 |
if yesno "Do you wish to run sa-update to fetch new rules" "N";then |
50 |
${PKG_PREFIX}/bin/sa-update || true |
51 |
fi |
52 |
grep '^load.*Rule2XSBody' ${PKG_PREFIX}/etc/mail/spamassassin/v320.pre > /dev/null |
53 |
if [ $? -eq 0 ];then |
54 |
if yesno "Do you wish to compile rules with re2c (will take a long time)" "N";then |
55 |
${PKG_PREFIX}/bin/sa-compile || true |
56 |
fi |
57 |
fi |
58 |
fi |
59 |
|
60 |
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then |
36 |
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then |
61 |
if pw groupadd ${GROUP} -g ${GID}; then |
37 |
if pw groupadd ${GROUP} -g ${GID}; then |
62 |
echo "Added group \"${GROUP}\"." |
38 |
echo "Added group \"${GROUP}\"." |
Lines 81-92
Link Here
|
81 |
|
57 |
|
82 |
# Create pid directory |
58 |
# Create pid directory |
83 |
mkdir /var/run/spamd 2> /dev/null && chown ${USER}:${GROUP} /var/run/spamd |
59 |
mkdir /var/run/spamd 2> /dev/null && chown ${USER}:${GROUP} /var/run/spamd |
|
|
60 |
/usr/bin/su root -c "${PKG_PREFIX}/bin/spamassassin -x -L --lint" |
84 |
|
61 |
|
85 |
exit 0 |
62 |
if [ ${?} -eq 255 ];then |
86 |
fi # post-install |
|
|
87 |
|
88 |
if [ "$2" = "PRE-INSTALL" ]; then |
89 |
if [ ! -e ${PKG_PREFIX}/etc/mail/spamassassin/v320.pre ]; then |
90 |
echo "***********************************************" |
63 |
echo "***********************************************" |
91 |
echo "*__ ___ ____ _ _ ___ _ _ ____ *" |
64 |
echo "*__ ___ ____ _ _ ___ _ _ ____ *" |
92 |
echo "*\ \ / / \ | _ \| \ | |_ _| \ | |/ ___|*" |
65 |
echo "*\ \ / / \ | _ \| \ | |_ _| \ | |/ ___|*" |
Lines 97-106
Link Here
|
97 |
echo "*You must install rules before starting spamd!*" |
70 |
echo "*You must install rules before starting spamd!*" |
98 |
echo "***********************************************" |
71 |
echo "***********************************************" |
99 |
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then |
72 |
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then |
100 |
sleep 10; |
73 |
if yesno "Do you wish to run sa-update to fetch new rules" "N";then |
|
|
74 |
${PKG_PREFIX}/bin/sa-update || true |
75 |
else |
76 |
echo "" |
77 |
fi |
78 |
/usr/bin/su root -c "${PKG_PREFIX}/bin/spamassassin -x -L --lint" |
79 |
if [ ${?} -eq 0 ] && grep '^load.*Rule2XSBody' ${PKG_PREFIX}/etc/mail/spamassassin/v320.pre > /dev/null ;then |
80 |
if yesno "Do you wish to compile rules with re2c (will take a long time)" "N";then |
81 |
${PKG_PREFIX}/bin/sa-compile || true |
101 |
fi |
82 |
fi |
102 |
fi |
83 |
fi |
|
|
84 |
fi |
85 |
fi |
86 |
|
103 |
exit 0 |
87 |
exit 0 |
104 |
fi |
88 |
fi # post-install |
105 |
|
89 |
|
106 |
exit 0 |
90 |
exit 0 |