Skip to content

Commit 4b15491

Browse files
committed
daemon autostart while apt-get install
1 parent c8adfe0 commit 4b15491

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

install/vst-install-debian.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,14 +373,24 @@ if [ "$srv_type" = 'small' ]; then
373373
software=$(echo "$software" | sed -e 's/spamassassin//')
374374
fi
375375

376-
# Install Vesta packages
376+
# Update system packages
377377
apt-get update
378+
379+
# Disable daemon autostart
380+
# For more details /usr/share/doc/sysv-rc/README.policy-rc.d.gz
381+
echo -e '#!/bin/sh \nexit 101' > /usr/sbin/policy-rc.d
382+
chmod a+x /usr/sbin/policy-rc.d
383+
384+
# Install Vesta packages
378385
apt-get -y install $software
379386
if [ $? -ne 0 ]; then
380387
echo 'Error: apt-get install failed'
381388
exit 1
382389
fi
383390

391+
# Restore policy
392+
rm -f /usr/sbin/policy-rc.d
393+
384394

385395
#----------------------------------------------------------#
386396
# Configure system #

install/vst-install-ubuntu.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,24 @@ if [ "$srv_type" = 'small' ]; then
375375
software=$(echo "$software" | sed -e 's/spamassassin//')
376376
fi
377377

378-
# Install Vesta packages
378+
# Update system packages
379379
apt-get update
380+
381+
# Disable daemon autostart
382+
# For more details /usr/share/doc/sysv-rc/README.policy-rc.d.gz
383+
echo -e '#!/bin/sh \nexit 101' > /usr/sbin/policy-rc.d
384+
chmod a+x /usr/sbin/policy-rc.d
385+
386+
# Install Vesta packages
380387
apt-get -y install $software
381388
if [ $? -ne 0 ]; then
382389
echo 'Error: apt-get install failed'
383390
exit 1
384391
fi
385392

393+
# Restore policy
394+
rm -f /usr/sbin/policy-rc.d
395+
386396

387397
#----------------------------------------------------------#
388398
# Configure system #

0 commit comments

Comments
 (0)