mysociety / alaveteli

Provide a Freedom of Information request system for your jurisdiction
https://alaveteli.org
Other
387 stars 195 forks source link

Interpolate vhost name in to sysvinit scripts #2297

Open garethrees opened 9 years ago

garethrees commented 9 years ago

We already interpolate $site to get a unique name…

#! /bin/sh
### BEGIN INIT INFO
# Provides:          application-passenger-!!(*= $site *)!!
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts the Passenger app server for the "!!(*= $site *)!!" site
# Description:       The Passenger app server for the "!!(*= $site *)!!" site
### END INIT INFO

…but our internal deployment system uses $site, which is always alaveteli.

Lupdate-rc.d: using dependency based boot sequencing
insserv: script staging.alaveteli.org-alaveteli: service application-passenger-alaveteli already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
Stopping Alaveteli app server: alaveteli.
HEAD is now at ec7de55... Update Nicaragua translations

We need to use the vhost name, for the $site parameter here.

garethrees commented 9 years ago

Looks like we can still start/stop/restart the apps, so not sure how much of an issue this is.

@Flupsy any thoughts on whether this is a big problem?

chrismytton commented 9 years ago

FWIW PopIt uses $daemon_name, which should be unique across separate vhosts.