diff --git a/data/hooks/conf_regen/12-metronome b/data/hooks/conf_regen/12-metronome index b52c18d88..ada37e8d8 100644 --- a/data/hooks/conf_regen/12-metronome +++ b/data/hooks/conf_regen/12-metronome @@ -38,7 +38,7 @@ for domain in $domain_list; do cat domain.cfg.lua.sed \ | sed "s/{{ domain }}/$domain/g" \ | sudo tee $domain.cfg.lua - if [[ $(safe_copy $domain.cfg.lua /etc/metronome/conf.d/$domain.cfg.lua) == "True" ]]; then + if [[ $(safe_copy $domain.cfg.lua /etc/metronome/conf.d/$domain.cfg.lua | tail -n1) == "True" ]]; then need_restart=True fi done @@ -50,7 +50,7 @@ for file in /etc/metronome/conf.d/*; do | sed 's|.cfg.lua||') sanitzed_domain="$(echo $domain | sed 's/\./%2e/g')" [[ $domain_list =~ $domain ]] \ - || ($(sudo yunohost service saferemove -s metronome $file) == "True" \ + || ($(sudo yunohost service saferemove -s metronome $file | tail -n1) == "True" \ && rm -rf /var/lib/metronome/$sanitzed_domain) done diff --git a/data/hooks/conf_regen/15-nginx b/data/hooks/conf_regen/15-nginx index e5a8716b3..889d7408f 100644 --- a/data/hooks/conf_regen/15-nginx +++ b/data/hooks/conf_regen/15-nginx @@ -45,7 +45,7 @@ if [ -f /etc/yunohost/installed ]; then cat server.conf.sed \ | sed "s/{{ domain }}/$domain/g" \ | sudo tee $domain.conf - [[ $(safe_copy $domain.conf /etc/nginx/conf.d/$domain.conf) == "True" ]] \ + [[ $(safe_copy $domain.conf /etc/nginx/conf.d/$domain.conf | tail -n1) == "True" ]] \ && need_restart=True [ -f /etc/nginx/conf.d/$domain.d/yunohost_local.conf ] \ diff --git a/data/hooks/conf_regen/34-mysql b/data/hooks/conf_regen/34-mysql index 021e4537a..d34b30880 100644 --- a/data/hooks/conf_regen/34-mysql +++ b/data/hooks/conf_regen/34-mysql @@ -21,7 +21,7 @@ function randpass () { cd /usr/share/yunohost/templates/mysql -if [[ "$(safe_copy my.cnf /etc/mysql/my.cnf)" == "True" ]]; then +if [[ "$(safe_copy my.cnf /etc/mysql/my.cnf | tail -n1)" == "True" ]]; then sudo service mysql restart fi diff --git a/data/hooks/conf_regen/37-avahi-daemon b/data/hooks/conf_regen/37-avahi-daemon index 31306de53..02bca0386 100644 --- a/data/hooks/conf_regen/37-avahi-daemon +++ b/data/hooks/conf_regen/37-avahi-daemon @@ -15,6 +15,6 @@ function safe_copy () { cd /usr/share/yunohost/templates/avahi-daemon -if [[ "$(safe_copy avahi-daemon.conf /etc/avahi/avahi-daemon.conf)" == "True" ]]; then +if [[ "$(safe_copy avahi-daemon.conf /etc/avahi/avahi-daemon.conf | tail -n1)" == "True" ]]; then sudo service avahi-daemon restart fi diff --git a/data/hooks/conf_regen/40-glances b/data/hooks/conf_regen/40-glances index 9f7c9c5c8..d9bb8aa20 100644 --- a/data/hooks/conf_regen/40-glances +++ b/data/hooks/conf_regen/40-glances @@ -15,6 +15,6 @@ function safe_copy () { cd /usr/share/yunohost/templates/glances -if [[ "$(safe_copy glances.default /etc/default/glances)" == "True" ]]; then +if [[ "$(safe_copy glances.default /etc/default/glances | tail -n1)" == "True" ]]; then sudo service glances restart fi diff --git a/data/hooks/conf_regen/46-nsswitch b/data/hooks/conf_regen/46-nsswitch index 73535eeda..90d05e087 100644 --- a/data/hooks/conf_regen/46-nsswitch +++ b/data/hooks/conf_regen/46-nsswitch @@ -15,6 +15,6 @@ function safe_copy () { cd /usr/share/yunohost/templates/nsswitch -if [[ "$(safe_copy nsswitch.conf /etc/nsswitch.conf)" == "True" ]]; then +if [[ "$(safe_copy nsswitch.conf /etc/nsswitch.conf | tail -n1)" == "True" ]]; then sudo service nscd restart fi diff --git a/data/hooks/conf_regen/49-udisks-glue b/data/hooks/conf_regen/49-udisks-glue index 85de9182d..03dbc75d4 100644 --- a/data/hooks/conf_regen/49-udisks-glue +++ b/data/hooks/conf_regen/49-udisks-glue @@ -15,6 +15,6 @@ function safe_copy () { cd /usr/share/yunohost/templates/udisks-glue -if [[ "$(safe_copy udisks-glue.conf /etc/udisks-glue.conf)" == "True" ]]; then +if [[ "$(safe_copy udisks-glue.conf /etc/udisks-glue.conf | tail -n1)" == "True" ]]; then sudo service udisks-glue restart fi diff --git a/data/hooks/conf_regen/52-fail2ban b/data/hooks/conf_regen/52-fail2ban index 9c609c74a..b9d76afeb 100644 --- a/data/hooks/conf_regen/52-fail2ban +++ b/data/hooks/conf_regen/52-fail2ban @@ -24,6 +24,6 @@ version=$(sed 's/\..*//' /etc/debian_version) && sudo cp jail-jessie.conf jail.conf \ || sudo cp jail-wheezy.conf jail.conf -if [[ $(safe_copy jail.conf /etc/fail2ban/jail.conf) == "True" ]]; then +if [[ $(safe_copy jail.conf /etc/fail2ban/jail.conf | tail -n1) == "True" ]]; then sudo service fail2ban restart fi