[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#798430: apache2: please add systemd service file



Hi Timo,

thanks for your help.

There are a few more things to consider here. We will still have to 
support using sysv-init and init scripts. Also, in practice, support 
for apache2 in Debian/Ubuntu is mostly done on upstream mailing lists. 
And people expect that apachectl will work correctly. Because of these 
reasons, it makes sense to not deviate too much between systemd and 
sysv-init, if possible.


On Saturday 19 March 2016 14:55:25, Timo Aaltonen wrote:
 
> > Also, some configuration is done via /etc/apache2/envvars and
> > /etc/default/apache2 . This would need to be taken care of, too.
> 
> /etc/default/apache2 seems to be mostly for htcacheclean, and
> envvars would be deprecated with this move because it's not just a
> config file listing variables but something that a shell script
> should import. But the unit file can set the defaults, changes
> would then be managed "natively" via
> /etc/systemd/system/apache2.service.d/*.

Because of the things outlined above, I think the systemd unit should 
still use the envvars file. Probably this is best achieved by calling 
apachectl instead of apache2 directly.

> 
> I've tried to support extra instances too but that's untested.
> Enabling an instance would just mean to drop a symlink like
> /etc/systemd/system/apache2.target.wants/apache2@-foo.service ->
> /lib/systemd/system/apache2@.service

Using such a template service file for extra instances seems like the 
correct approach.


> I haven't tested it though, but a similar approach works great with
> 389-ds-base and pki-server.

I will take a stab at separating htcacheclean in the init script and 
adding a2enmod support. This is a necessary first step for adding unit 
files.

Cheers,
Stefan


Reply to: