Add sample configuration for AMaViS install script.
This commit is contained in:
parent
c648e9e849
commit
79d8b859cd
23
conf/install_amavis.conf.sample
Normal file
23
conf/install_amavis.conf.sample
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# ---
|
||||||
|
# - Parametersettins postfix bases system
|
||||||
|
# ---
|
||||||
|
|
||||||
|
_HOSTNAME=
|
||||||
|
_IPV4=
|
||||||
|
_IPV6=
|
||||||
|
|
||||||
|
_QUARANTINE_DIR=/var/QUARANTINE
|
||||||
|
_QUARANTINE_ADMIN=postmaster\@$mydomain
|
||||||
|
|
||||||
|
_DB_IN_USE=false
|
||||||
|
_DB_TYPE=None
|
||||||
|
_DB_HOST=
|
||||||
|
_DB_NAME=
|
||||||
|
_DB_USER=
|
||||||
|
_DB_PASS=
|
||||||
|
_INSTALL_CLAMAV_UNOFFICIAL_SIGS=true
|
||||||
|
_MALWARE_PATROL_IN_USE=true
|
||||||
|
_MALWERE_PATROL_FREE=false
|
||||||
|
_MP_RECEIPT_NUMBER=106015125438
|
||||||
|
_SECURITE_INFO_IN_USE=true
|
||||||
|
_SI_AUTHORISATION_SIGNATURE=abb4ec6b194639f3d123154f1b971843a3b8751d8c1bcdc7d07ed6db26621b11bca0e23d2a42b60aef3f7b7803a1466a964d90c7b1e82d67c7680c8f46b59a4e
|
@ -130,10 +130,39 @@ detect_os_1 () {
|
|||||||
|
|
||||||
# - Is 'systemd' supported on this system
|
# - Is 'systemd' supported on this system
|
||||||
# -
|
# -
|
||||||
if [ "X`which systemd`" = "X" ]; then
|
systemd_supported=false
|
||||||
SYSTEMD_EXISTS=false
|
|
||||||
else
|
systemd=$(which systemd)
|
||||||
SYSTEMD_EXISTS=true
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] && [[ -n "$systemctl" ]] ; then
|
||||||
|
systemd_supported=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# - Look for systemd service file or sysv init script for apache2 webservice
|
||||||
|
# -
|
||||||
|
APACHE_SERVICE_FILE=""
|
||||||
|
APACHE_INIT_SCRIPT=""
|
||||||
|
if $systemd_supported ; then
|
||||||
|
# - Is Service exclusive controlled by systemd
|
||||||
|
# -
|
||||||
|
if systemctl -t service list-unit-files \
|
||||||
|
| grep -e "^apache" \
|
||||||
|
| grep -q -E "(enabled|disabled)" 2> /devnull ; then
|
||||||
|
|
||||||
|
APACHE_SERVICE_FILE=$(systemctl -t service list-unit-files \
|
||||||
|
| grep -e "^apache" \
|
||||||
|
| awk '{print$1}')
|
||||||
|
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$APACHE_SERVICE_FILE" ]] ; then
|
||||||
|
if [ -x "/etc/init.d/apache2" ]; then
|
||||||
|
APACHE_INIT_SCRIPT="/etc/init.d/apache2"
|
||||||
|
elif [ -x "/etc/init.d/apachectl" ]; then
|
||||||
|
APACHE_INIT_SCRIPT="/etc/init.d/apachectl"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# - Set variable
|
# - Set variable
|
||||||
@ -435,7 +464,7 @@ echo -e "\tHostname for Vacation Messages.......: $AUTOREPLY_HOSTNAME"
|
|||||||
echo -e "\tUser of vacation script..............: $VACATION_USER"
|
echo -e "\tUser of vacation script..............: $VACATION_USER"
|
||||||
echo -e "\tGroup of vacation script.............: $VACATION_GROUP"
|
echo -e "\tGroup of vacation script.............: $VACATION_GROUP"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "\tSystem supports systemd..............: $SYSTEMD_EXISTS"
|
echo -e "\tSystem supports systemd..............: $systemd_supported"
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@ -1156,10 +1185,26 @@ fi
|
|||||||
|
|
||||||
echononl "\tCreate VHost Configuration '${WEBSITE_NAME}.conf'.."
|
echononl "\tCreate VHost Configuration '${WEBSITE_NAME}.conf'.."
|
||||||
_failed=false
|
_failed=false
|
||||||
|
_create_vhost_config=true
|
||||||
|
if [[ -n "$IPV6" ]] && [[ -n "$IPV4" ]] ; then
|
||||||
|
_vhost_ip_string_80="$IPV4:80 [$IPV6]:80"
|
||||||
|
_vhost_ip_string_443="$IPV4:443 [$IPV6]:443"
|
||||||
|
elif [[ -n "$IPV4" ]] ; then
|
||||||
|
_vhost_ip_string_80="$IPV4:80"
|
||||||
|
_vhost_ip_string_443="$IPV4:443"
|
||||||
|
elif [[ -n "$IPV6" ]] ; then
|
||||||
|
_vhost_ip_string_80=" [$IPV6]:80"
|
||||||
|
_vhost_ip_string_443=" [$IPV6]:443"
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "Neither an ipv4 nor an ipv6 address are given.!"
|
||||||
|
_create_vhost_config=false
|
||||||
|
fi
|
||||||
|
if $_create_vhost_config ; then
|
||||||
cat <<EOF > ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
cat <<EOF > ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
||||||
# -- $WEBSITE_NAME -- #
|
# -- $WEBSITE_NAME -- #
|
||||||
|
|
||||||
<VirtualHost $IPV4:80 [$IPV6]:80>
|
<VirtualHost $_vhost_ip_string_80>
|
||||||
|
|
||||||
ServerAdmin $WEBMASTER_EMAIL
|
ServerAdmin $WEBMASTER_EMAIL
|
||||||
|
|
||||||
@ -1175,7 +1220,7 @@ cat <<EOF > ${APACHE_VHOST_DIR}/${WEBSITE_NAME}.conf 2>> $log_file
|
|||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
|
||||||
<VirtualHost $IPV4:443 [$IPV6]:443>
|
<VirtualHost $_vhost_ip_string_443>
|
||||||
|
|
||||||
ServerAdmin $WEBMASTER_EMAIL
|
ServerAdmin $WEBMASTER_EMAIL
|
||||||
|
|
||||||
@ -1391,6 +1436,7 @@ if $APACHE_DEBIAN_INSTALLATION ; then
|
|||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi # if $_create_vhost_config
|
||||||
|
|
||||||
echononl "\tCreate 'robots.txt'.."
|
echononl "\tCreate 'robots.txt'.."
|
||||||
cat <<EOF > ${WEBSITE_BASEDIR}/htdocs/robots.txt 2> $log_file
|
cat <<EOF > ${WEBSITE_BASEDIR}/htdocs/robots.txt 2> $log_file
|
||||||
@ -1404,11 +1450,13 @@ else
|
|||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echononl "\tRestart Apache Webservice.."
|
echononl "\tRestart Apache Webservice.."
|
||||||
if $APACHE_DEBIAN_INSTALLATION ; then
|
if [[ -n "$APACHE_SERVICE_FILE" ]] || [[ -n "$APACHE_INIT_SCRIPT" ]] ; then
|
||||||
/etc/init.d/apache2 reload > $log_file 2>&1
|
if [[ -n "$APACHE_SERVICE_FILE" ]] ; then
|
||||||
|
systemctl restart $APACHE_SERVICE_FILE > $log_file 2>&1
|
||||||
else
|
else
|
||||||
/etc/init.d/apache2 restart > $log_file 2>&1
|
$APACHE_INIT_SCRIPT restart > $log_file 2>&1
|
||||||
fi
|
fi
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
echo_ok
|
echo_ok
|
||||||
@ -1416,6 +1464,10 @@ else
|
|||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo_skipped
|
||||||
|
warn "Neither an init-script nor a service file for 'apache2' webservice found!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo -e "\n\n\t\033[37m\033[1mInstall Vacation\033[m\n"
|
echo -e "\n\n\t\033[37m\033[1mInstall Vacation\033[m\n"
|
||||||
@ -1726,7 +1778,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echononl "\tReload/Restart postfix"
|
echononl "\tReload/Restart postfix"
|
||||||
if $SYSTEMD_EXISTS ; then
|
if $systemd_supported ; then
|
||||||
systemctl reload postfix > $log_file 2>&1
|
systemctl reload postfix > $log_file 2>&1
|
||||||
else
|
else
|
||||||
/etc/init.d/postfix reload > $log_file 2>&1
|
/etc/init.d/postfix reload > $log_file 2>&1
|
||||||
@ -2960,7 +3012,7 @@ fi
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echononl "\tReload/Restart postfix"
|
echononl "\tReload/Restart postfix"
|
||||||
if $SYSTEMD_EXISTS ; then
|
if $systemd_supported ; then
|
||||||
systemctl reload postfix > $log_file 2>&1
|
systemctl reload postfix > $log_file 2>&1
|
||||||
else
|
else
|
||||||
/etc/init.d/postfix reload > $log_file 2>&1
|
/etc/init.d/postfix reload > $log_file 2>&1
|
||||||
@ -2976,7 +3028,7 @@ fi
|
|||||||
# -
|
# -
|
||||||
if [[ -n "$php_major_versions" ]]; then
|
if [[ -n "$php_major_versions" ]]; then
|
||||||
for _ver in $php_major_versions ; do
|
for _ver in $php_major_versions ; do
|
||||||
echononl " Restart PHP FPM engine v${_ver}.."
|
echononl "\tRestart PHP FPM engine v${_ver}.."
|
||||||
if [[ -f "/etc/init.d/php-${_ver}-fpm" ]]; then
|
if [[ -f "/etc/init.d/php-${_ver}-fpm" ]]; then
|
||||||
/etc/init.d/php-${_ver}-fpm restart > $log_file 2>&1
|
/etc/init.d/php-${_ver}-fpm restart > $log_file 2>&1
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user