debian: use os-svc-enable to enable apache

apache service is called “httpd” on RHEL/Fedora and apache2 on
Debian/Ubuntu/Fedora.

As pointed by Ben Nemec, os-svc-enable is best way to deal with this
complexity and thus support all the operating system properly.

This commit requires change I125c46bebb0342ee3bdb957116e7c7e8e27a2ecc
on diskimage-builder to be able to enable apache with os-svc-enable.

Change-Id: I4720b61eb0fd15e539564edd25843f8332478abf
This commit is contained in:
Gonéri Le Bouder 2014-04-11 18:14:36 +02:00
parent b9ff75ff85
commit 686a5e958c
2 changed files with 2 additions and 3 deletions

View File

@ -1,2 +1,3 @@
os-apply-config
os-refresh-config
os-svc-install

View File

@ -1,6 +1,4 @@
#!/bin/bash
set -eux
if [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
systemctl enable httpd.service
fi
os-svc-enable -n apache2