install_update_dovecot.sh: don't ask for setting symlink an also don't ask for restarting mail services.
This commit is contained in:
parent
bb751add0d
commit
591a2c6b82
@ -3779,52 +3779,88 @@ else
|
|||||||
fatal "Adjusting file /usr/local/dovecot-${_version}/etc/dovecot/conf.d/20-managesieve.conf failed"
|
fatal "Adjusting file /usr/local/dovecot-${_version}/etc/dovecot/conf.d/20-managesieve.conf failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_set_link=""
|
#_set_link=""
|
||||||
echo
|
#echo
|
||||||
echo "Set symlink "
|
#echo "Set symlink "
|
||||||
echo -e -n " /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot? [y/n]: "
|
#echo -e -n " /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot? [y/n]: "
|
||||||
read _set_link
|
#read _set_link
|
||||||
if [ "y" = "$_set_link" -o "Y" = "$_set_link" -o "Yes" = "$_set_link" -o "yes" = "$_set_link" ];then
|
#if [ "y" = "$_set_link" -o "Y" = "$_set_link" -o "Yes" = "$_set_link" -o "yes" = "$_set_link" ];then
|
||||||
echononl "\tCreate symlink.."
|
# echononl "\tCreate symlink.."
|
||||||
rm -f /usr/local/dovecot
|
# rm -f /usr/local/dovecot
|
||||||
ln -s dovecot-${_version} /usr/local/dovecot
|
# ln -s dovecot-${_version} /usr/local/dovecot
|
||||||
if [ "$?" = 0 ]; then
|
# if [ "$?" = 0 ]; then
|
||||||
echo -e "$rc_done"
|
# echo -e "$rc_done"
|
||||||
else
|
# else
|
||||||
echo -e "$rc_failed"
|
# echo -e "$rc_failed"
|
||||||
fatal "Creating Symlink /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot failed"
|
# fatal "Creating Symlink /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot failed"
|
||||||
fi
|
# fi
|
||||||
|
#fi
|
||||||
|
|
||||||
|
blank_line
|
||||||
|
echononl "\tCreate symlink.."
|
||||||
|
rm -f /usr/local/dovecot
|
||||||
|
ln -s dovecot-${_version} /usr/local/dovecot
|
||||||
|
if [ "$?" = 0 ]; then
|
||||||
|
echo -e "$rc_done"
|
||||||
|
else
|
||||||
|
echo -e "$rc_failed"
|
||||||
|
fatal "Creating Symlink /usr/local/dovecot --> dovecot-${_version} /usr/local/dovecot failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_restart=""
|
#_restart=""
|
||||||
echo
|
#echo
|
||||||
echo -e -n "Start/Restart services (dovecot/postfix)? [y/n]: "
|
#echo -e -n "Start/Restart services (dovecot/postfix)? [y/n]: "
|
||||||
read _restart
|
#read _restart
|
||||||
if [ "y" = "$_restart" -o "Y" = "$_restart" -o "Yes" = "$_restart" -o "yes" = "$_restart" ];then
|
#if [ "y" = "$_restart" -o "Y" = "$_restart" -o "Yes" = "$_restart" -o "yes" = "$_restart" ];then
|
||||||
echononl "\tStart dovecot service.."
|
# echononl "\tStart dovecot service.."
|
||||||
if $systemd_support ; then
|
# if $systemd_support ; then
|
||||||
systemctl start dovecot
|
# systemctl start dovecot
|
||||||
else
|
# else
|
||||||
/etc/init.d/dovecot start > /dev/null 2>&1
|
# /etc/init.d/dovecot start > /dev/null 2>&1
|
||||||
fi
|
# fi
|
||||||
if [ "$?" = 0 ]; then
|
# if [ "$?" = 0 ]; then
|
||||||
echo -e "$rc_done"
|
# echo -e "$rc_done"
|
||||||
else
|
# else
|
||||||
echo -e "$rc_failed"
|
# echo -e "$rc_failed"
|
||||||
error "Starting dovecot service failed"
|
# error "Starting dovecot service failed"
|
||||||
fi
|
# fi
|
||||||
echononl "\tRestart postfix.."
|
# echononl "\tRestart postfix.."
|
||||||
if $SYSTEMD_EXISTS ; then
|
# if $SYSTEMD_EXISTS ; then
|
||||||
systemctl restart postfix
|
# systemctl restart postfix
|
||||||
else
|
# else
|
||||||
/etc/init.d/postfix restart > /dev/null 2>&1
|
# /etc/init.d/postfix restart > /dev/null 2>&1
|
||||||
fi
|
# fi
|
||||||
if [ "$?" = 0 ]; then
|
# if [ "$?" = 0 ]; then
|
||||||
echo -e "$rc_done"
|
# echo -e "$rc_done"
|
||||||
else
|
# else
|
||||||
echo -e "$rc_failed"
|
# echo -e "$rc_failed"
|
||||||
fatal "Restarting postfix failed"
|
# fatal "Restarting postfix failed"
|
||||||
fi
|
# fi
|
||||||
|
#fi
|
||||||
|
|
||||||
|
echononl "\tStart dovecot service.."
|
||||||
|
if $systemd_support ; then
|
||||||
|
systemctl start dovecot
|
||||||
|
else
|
||||||
|
/etc/init.d/dovecot start > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if [ "$?" = 0 ]; then
|
||||||
|
echo -e "$rc_done"
|
||||||
|
else
|
||||||
|
echo -e "$rc_failed"
|
||||||
|
error "Starting dovecot service failed"
|
||||||
|
fi
|
||||||
|
echononl "\tRestart postfix.."
|
||||||
|
if $SYSTEMD_EXISTS ; then
|
||||||
|
systemctl restart postfix
|
||||||
|
else
|
||||||
|
/etc/init.d/postfix restart > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if [ "$?" = 0 ]; then
|
||||||
|
echo -e "$rc_done"
|
||||||
|
else
|
||||||
|
echo -e "$rc_failed"
|
||||||
|
fatal "Restarting postfix failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user