fixing SUDO + adding 'upgrade' in alternc.install for alternc-mailman + adding COLOR in alternc.install and postinst
This commit is contained in:
parent
60cadfafed
commit
63f2b577ba
2
Makefile
2
Makefile
|
@ -44,6 +44,8 @@ install-common:
|
||||||
test -d $(DESTDIR)/etc || mkdir -p $(DESTDIR)/etc
|
test -d $(DESTDIR)/etc || mkdir -p $(DESTDIR)/etc
|
||||||
cp -r etc/alternc $(DESTDIR)/etc
|
cp -r etc/alternc $(DESTDIR)/etc
|
||||||
cp -r etc/incron.d $(DESTDIR)/etc
|
cp -r etc/incron.d $(DESTDIR)/etc
|
||||||
|
install -o root -g root -m 440 etc/sudoers.d/alternc $(DESTDIR)/etc/sudoers.d
|
||||||
|
# SVN cleanup (bad if installing without DESTDIR, FIXME)
|
||||||
find $(DESTDIR)/etc/ -depth -type d -name ".svn" -exec rm {} -rf \;
|
find $(DESTDIR)/etc/ -depth -type d -name ".svn" -exec rm {} -rf \;
|
||||||
chmod 755 $(DESTDIR)/etc/alternc etc/incron.d
|
chmod 755 $(DESTDIR)/etc/alternc etc/incron.d
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
etc/sudoers.d
|
||||||
etc/alternc
|
etc/alternc
|
||||||
etc/alternc/apache-panel.d
|
etc/alternc/apache-panel.d
|
||||||
etc/alternc/templates
|
etc/alternc/templates
|
||||||
|
|
|
@ -251,42 +251,19 @@ EOF
|
||||||
# Apache will not start without this file
|
# Apache will not start without this file
|
||||||
touch /var/lib/alternc/apache-vhost/vhosts_all.conf
|
touch /var/lib/alternc/apache-vhost/vhosts_all.conf
|
||||||
|
|
||||||
#sudo stuff allowing alterncpanel to use quota
|
|
||||||
if [ -d /etc/sudoers.d ]; then
|
|
||||||
cp /etc/alternc/alternc-sudoers /etc/sudoers.d/alternc-sudoers
|
|
||||||
chmod 0440 /etc/sudoers.d/alternc-sudoers
|
|
||||||
if ! grep -q '#includedir /etc/sudoers.d' "/etc/sudoers"; then
|
|
||||||
echo "*************************************************"
|
|
||||||
echo "* *"
|
|
||||||
echo "* /!\ WARNING /!\ *"
|
|
||||||
echo "* Please add yourself the following directive : *"
|
|
||||||
echo "* #includedir /etc/sudoers.d *"
|
|
||||||
echo "* in file /etc/sudoers (use visudo command) *"
|
|
||||||
echo "* Else you'll have troubles with some features *"
|
|
||||||
echo "* of AlternC *"
|
|
||||||
echo "* *"
|
|
||||||
echo "*************************************************"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "running an older version of sudo"
|
|
||||||
#FIXME
|
|
||||||
echo "copy content of /usr/share/doc/examples/example.sudoers into /etc/sudoers.d to run properly"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# important: postinst freezes without that:
|
# important: postinst freezes without that:
|
||||||
db_stop
|
db_stop
|
||||||
|
|
||||||
# instead of preinst, we launch it here :
|
# instead of preinst, we launch it here :
|
||||||
/usr/lib/alternc/fixperms.sh
|
/usr/lib/alternc/fixperms.sh
|
||||||
echo "**********************************************"
|
echo -e "\033[31m**********************************************"
|
||||||
|
echo "* *"
|
||||||
|
echo "* ALTERNC ACTION REQUESTED *"
|
||||||
echo "* *"
|
echo "* *"
|
||||||
echo "* /!\ /!\ *"
|
|
||||||
echo "* ALTERNC: *"
|
|
||||||
echo "* Please run alternc.install to fully deploy *"
|
echo "* Please run alternc.install to fully deploy *"
|
||||||
echo "* *"
|
echo "* *"
|
||||||
echo "* *"
|
|
||||||
echo "* *"
|
|
||||||
echo "**********************************************"
|
echo "**********************************************"
|
||||||
|
echo -e "\033[0m"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash -e
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# AlternC - Web Hosting System
|
# AlternC - Web Hosting System
|
||||||
|
@ -28,8 +28,6 @@ if [ `id -u` -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
for i in $*; do
|
for i in $*; do
|
||||||
case "$i" in
|
case "$i" in
|
||||||
-f|--force)
|
-f|--force)
|
||||||
|
@ -114,6 +112,8 @@ fi
|
||||||
|
|
||||||
# Upgrade the DATA and DB SCHEMA
|
# Upgrade the DATA and DB SCHEMA
|
||||||
/usr/share/alternc/install/upgrade_check.sh
|
/usr/share/alternc/install/upgrade_check.sh
|
||||||
|
# Launch upgrade of alternc modules
|
||||||
|
run-parts --arg=upgrade /usr/lib/alternc/install.d
|
||||||
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
@ -340,6 +340,26 @@ if [ -x /usr/sbin/apache2 ]; then
|
||||||
SERVICES="$SERVICES $s"
|
SERVICES="$SERVICES $s"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Manage sudoers.d include appearing in Squeeze:
|
||||||
|
# if the "includedir" is not here, we add it ONLY IF visudo -c is happy.
|
||||||
|
if ! grep -q "#includedir */etc/sudoers.d" /etc/sudoers ; then
|
||||||
|
if ! cat /etc/sudoers.d/* | visudo -c -f - >/dev/null ; then
|
||||||
|
echo -e "\033[31m**********************************************"
|
||||||
|
echo "* *"
|
||||||
|
echo "* ALTERNC ACTION REQUESTED *"
|
||||||
|
echo "* *"
|
||||||
|
echo "* SUDO is NOT configured properly *"
|
||||||
|
echo "* check your files in /etc/sudoers.d ! *"
|
||||||
|
echo "* then launch alternc.install again *"
|
||||||
|
echo "* *"
|
||||||
|
echo "**********************************************"
|
||||||
|
echo -e "\033[0m"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "#includedir */etc/sudoers.d" >>/etc/sudoers
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy postfix *_checks if they do not exist
|
# Copy postfix *_checks if they do not exist
|
||||||
for file in body_checks header_checks; do
|
for file in body_checks header_checks; do
|
||||||
if [ ! -e "/etc/postfix/$file" ]; then
|
if [ ! -e "/etc/postfix/$file" ]; then
|
||||||
|
@ -355,12 +375,17 @@ fi
|
||||||
|
|
||||||
if [ ! -f /etc/postfix/main.cf ]
|
if [ ! -f /etc/postfix/main.cf ]
|
||||||
then
|
then
|
||||||
echo "****************************************"
|
echo -e "\033[31m**********************************************"
|
||||||
echo "POSTFIX is NOT configured properly"
|
echo "* *"
|
||||||
echo "please launch dpkg-reconfigure -plow postfix"
|
echo "* ALTERNC ACTION REQUESTED *"
|
||||||
echo "and choose 'Internet Site'"
|
echo "* *"
|
||||||
echo "then launch alternc.install again"
|
echo "* POSTFIX is NOT configured properly *"
|
||||||
echo "****************************************"
|
echo "* launch dpkg-reconfigure -plow postfix *"
|
||||||
|
echo "* and choose 'Internet Site' *"
|
||||||
|
echo "* then launch alternc.install again *"
|
||||||
|
echo "* *"
|
||||||
|
echo "**********************************************"
|
||||||
|
echo -e "\033[0m"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -381,13 +406,14 @@ grep -v '^\ *#' $postfix_conf |while read line ; do
|
||||||
if [ -e $cert_file ];then
|
if [ -e $cert_file ];then
|
||||||
postconf -e "$line"
|
postconf -e "$line"
|
||||||
else
|
else
|
||||||
echo "****************************************"
|
echo -e "\033[31m*****************************************************"
|
||||||
echo "The certificate file : $cert_file does not exists"
|
echo "* The certificate file : $cert_file does not exists *"
|
||||||
echo "please go to https://alternc.org/wiki/SSL to get information on how to create a certificate"
|
echo "* If you want to be able to use SSL/TLS *"
|
||||||
echo "Then edit the file /etc/alternc/postfix/postfix.cf to add"
|
echo "* please go to https://alternc.org/wiki/SSL *"
|
||||||
echo "the cert file path name to the key :smtpd_tls_cert_file"
|
echo "* to get information on how to create a certificate *"
|
||||||
echo "Finally relaunch alternc.install"
|
echo "* Finally relaunch alternc.install *"
|
||||||
echo "****************************************"
|
echo "*****************************************************"
|
||||||
|
echo -e "\033[0m"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
postconf -e "$line"
|
postconf -e "$line"
|
||||||
|
|
Loading…
Reference in New Issue