Make a2dissite fail softly if the site is not enabled
a2dissite will return a non-zero error code if the site that is being disabled is not currently enabled (that is, if the conf file for it does not exist). This can happen during development if you've been messing with files by hand. Rather than exploding out of a ./stack.sh, accept the missing file as meaning "it's disabled" and carry one. The rpm version of disable, which does not use a2dissite, does this already. Change-Id: Ie5dfd42efdff4bdba5ffaa765af000dd8e1d596e
This commit is contained in:
parent
6ed53156b6
commit
2fcdaac56e
|
@ -186,7 +186,7 @@ function enable_apache_site {
|
|||
function disable_apache_site {
|
||||
local site=$@
|
||||
if is_ubuntu; then
|
||||
sudo a2dissite ${site}
|
||||
sudo a2dissite ${site} || true
|
||||
elif is_fedora || is_suse; then
|
||||
local enabled_site_file="$APACHE_CONF_DIR/${site}.conf"
|
||||
# Do nothing if no site config exists
|
||||
|
|
Loading…
Reference in New Issue