functions ready

This commit is contained in:
temasky
2020-08-02 18:00:24 +00:00
parent 904a9ad30c
commit 8973abc07b
+27 -17
View File
@@ -46,7 +46,7 @@ if [[ ! -f ".configured" ]]; then
: ${IREDAPD_DB_PASSWD:=`eval </dev/urandom tr -dc A-Za-z0-9 | (head -c $1 &>/dev/null || head -c 20)`}
: ${FAIL2BAN_DB_PASSWD:=`eval </dev/urandom tr -dc A-Za-z0-9 | (head -c $1 &>/dev/null || head -c 20)`}
: ${USE_SYSTEMD:=NO}
: ${MAILNAME:=`hostname -f`}
if [[ X"${MYSQLEXIST}" == X'YES' || X"${MYSQLEXIST}" == X'yes' ]]; then
: ${USE_EXISTING_MYSQL:=YES}
@@ -61,6 +61,12 @@ if [[ ! -f ".configured" ]]; then
. /lib/lsb/init-functions
cat <<EOF > /etc/mailname
$MAILNAME
EOF
echo '>create initial config file'
cat <<EOF > /iredmail/config
@@ -293,7 +299,7 @@ EOF
}
if [[ X"${EXTERNAL_LDAP_USE}" == X'YES' || X"${EXTERNAL_LDAP_USE}" == X'yes' ]]; then
if [[ X"${LDAP_EXTERNAL_USE}" == X'YES' || X"${LDAP_EXTERNAL_USE}" == X'yes' ]]; then
external_ldap_config
fi
@@ -302,26 +308,30 @@ EOF
else
if [[ X"${MYSQLEXIST}" != X'YES' || X"${MYSQLEXIST}" != X'yes' ]]; then
service mysql start
fi
service iredapd start
service dovecot start
service clamav_clamd start
service clamav_freshclam start
service nginx start
service php7.2-fpm start
service amavisd start
# Start syslog-ng
/usr/sbin/syslog-ng -F --no-caps &
service postfix start
service mlmmjadmin_enable start
service uwsgi start
if [[ X"${EXTERNAL_LDAP_USE}" != X'YES' || X"${EXTERNAL_LDAP_USE}" != X'yes' ]]; then
if [[ X"${MYSQLEXIST}" != X'YES' || X"${MYSQLEXIST}" != X'yes' ]]; then
service mysql start
fi
service dovecot start
service nginx start
service php7.2-fpm start
# Start postfix
start-stop-daemon --start --exec /usr/sbin/postmulti -- -i - -x /usr/sbin/postfix quiet-quick-start
service clamav-daemon start
service clamav-freshclam start
service spamassasin start
service amavis start
service mlmmjadmin_enable start
service uwsgi start
if [[ X"${LDAP_EXTERNAL_USE}" != X'YES' || X"${LDAP_EXTERNAL_USE}" != X'yes' ]]; then
service slapd start
service iredapd start
fi