summaryrefslogtreecommitdiffstats
path: root/server/bin/setsmbpass
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-06-17 19:08:08 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-06-17 19:08:08 +0200
commit72d929592a60817a878d45b342813855ffc10cf8 (patch)
tree920d63aaf1468a35af9e2aa06b75352cd3671865 /server/bin/setsmbpass
parent418feb183560ff70a72df1c668481696f55fdf62 (diff)
#914: Fixed bug in commit {{{6a2bd87}}} and {{{5050850}}}.
Diffstat (limited to 'server/bin/setsmbpass')
-rwxr-xr-xserver/bin/setsmbpass2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/bin/setsmbpass b/server/bin/setsmbpass
index 4d91973d..efd90eec 100755
--- a/server/bin/setsmbpass
+++ b/server/bin/setsmbpass
@@ -105,7 +105,7 @@ for OGLIVE in $LIST; do
done
if [[ $CHANGES != 0 ]]; then
# Ticket 565, preparar acceso Rsync servidor.
- sed -i -n -e "/^$SAMBAUSER:/!p" -e "$ a$SAMBAUSER:$SAMBAPASS" /etc/rsyncd.secrets
+ [ -e /etc/rsyncd.secrets ] && sed -i -n -e "/^$SAMBAUSER:/!p" -e "$ a$SAMBAUSER:$SAMBAPASS" /etc/rsyncd.secrets || echo "$SAMBAUSER:$SAMBAPASS" > /etc/rsyncd.secrets
chown root.root /etc/rsyncd.secrets
chmod 600 /etc/rsyncd.secrets
# Cambiar clave Samba.