yunohost/hooks/conf_regen/46-nsswitch
2021-11-10 18:25:37 +01:00

25 lines
378 B
Bash
Executable file

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