yunohost/hooks/conf_regen/09-nslcd
2021-11-10 18:25:37 +01:00

25 lines
369 B
Bash
Executable file

#!/bin/bash
set -e
do_init_regen() {
do_pre_regen ""
systemctl restart nslcd
}
do_pre_regen() {
pending_dir=$1
cd /usr/share/yunohost/conf/nslcd
install -D -m 644 nslcd.conf "${pending_dir}/etc/nslcd.conf"
}
do_post_regen() {
regen_conf_files=$1
[[ -z "$regen_conf_files" ]] \
|| systemctl restart nslcd
}
do_$1_regen ${@:2}