yunohost/data/hooks/conf_regen/09-nslcd
2016-04-16 14:41:54 +02:00

32 lines
388 B
Bash
Executable file

#!/bin/bash
set -e
do_pre_regen() {
pending_dir=$1
cd /usr/share/yunohost/templates/nslcd
install -D nslcd.conf "${pending_dir}/etc/nslcd.conf"
}
do_post_regen() {
sudo service nslcd restart
}
FORCE=$2
case "$1" in
pre)
do_pre_regen $3
;;
post)
do_post_regen
;;
*)
echo "hook called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0