mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
Added if statements to check for directories/files before removing them.
Updated download location to include $release structure from http://c.vestacp.com/0.9.8/rhel/ Fixed error message that appears if /etc/dovecot doesn't exist when chowning.
This commit is contained in:
parent
5b06701fdc
commit
670b709f8f
1 changed files with 11 additions and 4 deletions
|
@ -725,12 +725,19 @@ fi
|
||||||
if [ "$release" -eq '5' ]; then
|
if [ "$release" -eq '5' ]; then
|
||||||
wget $CHOST/$VERSION/dovecot.conf -O /etc/dovecot.conf
|
wget $CHOST/$VERSION/dovecot.conf -O /etc/dovecot.conf
|
||||||
else
|
else
|
||||||
wget $CHOST/$VERSION/dovecot.tar.gz -O /etc/dovecot.tar.gz
|
wget $CHOST/$VERSION/$release/dovecot.tar.gz -O /etc/dovecot.tar.gz
|
||||||
cd /etc/
|
cd /etc
|
||||||
rm -rf dovecot
|
if [ -d /etc/dovecot ]; then
|
||||||
|
rm -rf /etc/dovecot
|
||||||
|
fi
|
||||||
|
if [ -f /etc/dovecot.conf ]; then
|
||||||
|
rm /etc/dovecot.conf
|
||||||
|
fi
|
||||||
tar -xzf dovecot.tar.gz
|
tar -xzf dovecot.tar.gz
|
||||||
rm -f dovecot.tar.gz
|
rm -f dovecot.tar.gz
|
||||||
chown -R root:root /etc/dovecot
|
if [ -d /etc/dovecot ]; then
|
||||||
|
chown -R root:root /etc/dovecot
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
gpasswd -a dovecot mail
|
gpasswd -a dovecot mail
|
||||||
chkconfig dovecot on
|
chkconfig dovecot on
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue