daemon autostart while apt-get install

This commit is contained in:
Serghey Rodin 2013-10-14 22:34:36 +03:00
commit 4b15491482
2 changed files with 22 additions and 2 deletions

View file

@ -373,14 +373,24 @@ if [ "$srv_type" = 'small' ]; then
software=$(echo "$software" | sed -e 's/spamassassin//')
fi
# Install Vesta packages
# Update system packages
apt-get update
# Disable daemon autostart
# For more details /usr/share/doc/sysv-rc/README.policy-rc.d.gz
echo -e '#!/bin/sh \nexit 101' > /usr/sbin/policy-rc.d
chmod a+x /usr/sbin/policy-rc.d
# Install Vesta packages
apt-get -y install $software
if [ $? -ne 0 ]; then
echo 'Error: apt-get install failed'
exit 1
fi
# Restore policy
rm -f /usr/sbin/policy-rc.d
#----------------------------------------------------------#
# Configure system #