mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
27 lines
517 B
Bash
27 lines
517 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
force=$1
|
|
|
|
function safe_copy () {
|
|
if [[ "$force" == "True" ]]; then
|
|
sudo yunohost service safecopy \
|
|
-s nslcd \
|
|
$1 $2 \
|
|
--force
|
|
else
|
|
sudo yunohost service safecopy \
|
|
-s nslcd \
|
|
$1 $2
|
|
fi
|
|
}
|
|
|
|
cd /usr/share/yunohost/templates/nslcd
|
|
|
|
safe_copy nslcd.conf /etc/nslcd.conf
|
|
|
|
# Fix: Add a blank line at the end of the file
|
|
# to avoid nscld restart failure
|
|
echo -e "\n" | sudo tee -a /etc/nslcd.conf
|
|
|
|
sudo service nslcd restart
|