diff options
author | Herman van Rink | 2016-02-18 20:40:18 (GMT) |
---|---|---|
committer | Herman van Rink | 2016-02-18 20:40:21 (GMT) |
commit | 7526aae2264139ccacbefe540d89e9f01a713780 (patch) | |
tree | 9e6372857c3f53b918dc5b89ad8c6b735c0cf88b /debian | |
parent | 483a048a857e6119d296573dfc89992cd905e1c0 (diff) |
Add explicit test to avoid needless error
The output would contain the error below, after which the second attempt (conf-enabled) would normally work OK.
ln: failed to create symbolic link '/etc/apache2/conf.d/aegir.conf': No such file or directory
Diffstat (limited to 'debian')
-rw-r--r-- | debian/aegir3-hostmaster.postinst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/debian/aegir3-hostmaster.postinst b/debian/aegir3-hostmaster.postinst index fde55a9..5237757 100644 --- a/debian/aegir3-hostmaster.postinst +++ b/debian/aegir3-hostmaster.postinst @@ -154,9 +154,13 @@ EOF case $WEBSERVER in apache) - # apache 2.2 || 2.4 - ln -sf $AEGIRHOME/config/$WEBSERVER.conf /etc/apache2/conf.d/aegir.conf \ - || ln -sf $AEGIRHOME/config/$WEBSERVER.conf /etc/apache2/conf-enabled/aegir.conf + if [ -d /etc/apache2/conf-enabled ]; then + # Apache 2.4 + ln -sf $AEGIRHOME/config/$WEBSERVER.conf /etc/apache2/conf-enabled/aegir.conf + else + # Apache 2.2 + ln -sf $AEGIRHOME/config/$WEBSERVER.conf /etc/apache2/conf.d/aegir.conf + fi a2enmod ssl rewrite apache2ctl graceful ;; |