[fix] Set default values for force and dry_run in conf_regen hooks

This commit is contained in:
Jérôme Lebleu 2016-04-22 12:18:25 +02:00
parent 3ecd22c372
commit 13ed77a6ca
17 changed files with 34 additions and 34 deletions

View file

@ -90,8 +90,8 @@ if updated:
EOF EOF
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -71,8 +71,8 @@ do_post_regen() {
# TODO: regenerate certificates if conf changed? # TODO: regenerate certificates if conf changed?
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -26,8 +26,8 @@ do_post_regen() {
fi fi
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -95,8 +95,8 @@ do_post_regen() {
sudo service slapd force-reload sudo service slapd force-reload
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -17,8 +17,8 @@ do_post_regen() {
|| sudo service nslcd restart || sudo service nslcd restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -57,8 +57,8 @@ do_post_regen() {
|| sudo service metronome restart || sudo service metronome restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -79,8 +79,8 @@ do_post_regen() {
sudo service nginx restart sudo service nginx restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -37,8 +37,8 @@ do_post_regen() {
|| sudo service postfix restart || sudo service postfix restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -50,8 +50,8 @@ do_post_regen() {
sudo service dovecot restart sudo service dovecot restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -48,8 +48,8 @@ do_post_regen() {
sudo systemctl -q stop rmilter.service 2>&1 || true sudo systemctl -q stop rmilter.service 2>&1 || true
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -31,8 +31,8 @@ do_post_regen() {
sudo systemctl -q stop rspamd.service 2>&1 || true sudo systemctl -q stop rspamd.service 2>&1 || true
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -32,8 +32,8 @@ do_post_regen() {
|| sudo service mysql restart || sudo service mysql restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -17,8 +17,8 @@ do_post_regen() {
|| sudo service avahi-daemon restart || sudo service avahi-daemon restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -17,8 +17,8 @@ do_post_regen() {
|| sudo service glances restart || sudo service glances restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -47,8 +47,8 @@ do_post_regen() {
|| sudo service dnsmasq restart || sudo service dnsmasq restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -17,8 +17,8 @@ do_post_regen() {
|| sudo service nscd restart || sudo service nscd restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)

View file

@ -21,8 +21,8 @@ do_post_regen() {
|| sudo service fail2ban restart || sudo service fail2ban restart
} }
FORCE=$2 FORCE=${2:-0}
DRY_RUN=$3 DRY_RUN=${3:-0}
case "$1" in case "$1" in
pre) pre)