testing: Correctly dis-/enable services with systemd
This commit is contained in:
@@ -113,7 +113,12 @@ execute_chroot "apt-get -y upgrade"
|
|||||||
for service in $SERVICES
|
for service in $SERVICES
|
||||||
do
|
do
|
||||||
log_action "Disabling service $service"
|
log_action "Disabling service $service"
|
||||||
execute_chroot "update-rc.d -f $service remove"
|
if [ "$BASEIMGSUITE" == "wheezy" ]
|
||||||
|
then
|
||||||
|
execute_chroot "update-rc.d -f $service remove"
|
||||||
|
else
|
||||||
|
execute_chroot "systemctl disable $service"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
log_action "Disabling root password"
|
log_action "Disabling root password"
|
||||||
|
|||||||
@@ -63,15 +63,22 @@ do
|
|||||||
execute_chroot "a2enmod -q cgid" 0
|
execute_chroot "a2enmod -q cgid" 0
|
||||||
execute_chroot "ln -s /etc/openssl/certs /var/www/certs" 0
|
execute_chroot "ln -s /etc/openssl/certs /var/www/certs" 0
|
||||||
execute_chroot "/etc/openssl/generate-crl" 0
|
execute_chroot "/etc/openssl/generate-crl" 0
|
||||||
execute_chroot "update-rc.d apache2 defaults" 0
|
|
||||||
execute_chroot "update-rc.d slapd defaults" 0
|
|
||||||
execute_chroot "rm -rf /var/lib/ldap/*" 0
|
execute_chroot "rm -rf /var/lib/ldap/*" 0
|
||||||
execute_chroot "slapadd -l /etc/ldap/ldif.txt -f /etc/ldap/slapd.conf" 0
|
execute_chroot "slapadd -l /etc/ldap/ldif.txt -f /etc/ldap/slapd.conf" 0
|
||||||
execute_chroot "chown -R openldap:openldap /var/lib/ldap" 0
|
execute_chroot "chown -R openldap:openldap /var/lib/ldap" 0
|
||||||
execute_chroot "dnssec-signzone -K /etc/bind -o strongswan.org. /etc/bind/db.strongswan.org" 0
|
execute_chroot "dnssec-signzone -K /etc/bind -o strongswan.org. /etc/bind/db.strongswan.org" 0
|
||||||
execute_chroot "dnssec-signzone -K /etc/bind -o org. /etc/bind/db.org" 0
|
execute_chroot "dnssec-signzone -K /etc/bind -o org. /etc/bind/db.org" 0
|
||||||
execute_chroot "dnssec-signzone -K /etc/bind -o . /etc/bind/db.root" 0
|
execute_chroot "dnssec-signzone -K /etc/bind -o . /etc/bind/db.root" 0
|
||||||
execute_chroot "update-rc.d bind9 defaults" 0
|
|
||||||
|
for service in "apache2 slapd bind9"
|
||||||
|
do
|
||||||
|
if [ "$BASEIMGSUITE" == "wheezy" ]
|
||||||
|
then
|
||||||
|
execute_chroot "update-rc.d $service defaults" 0
|
||||||
|
else
|
||||||
|
execute_chroot "systemctl enable $service" 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
sync
|
sync
|
||||||
execute "umount -l $LOOPDIR" 0
|
execute "umount -l $LOOPDIR" 0
|
||||||
|
|||||||
Reference in New Issue
Block a user