Browse Source

fix: [sftp] remove any ``authorized_keys`` that was previously left.

postgres
Valentin Lab 9 years ago
parent
commit
c6caf73543
  1. 4
      sftp/hooks/init

4
sftp/hooks/init

@ -20,9 +20,12 @@ users_def=$(echo "$service_def" | shyaml get-value options.users 2>/dev/null) ||
users_file="$SERVICE_CONFIGSTORE/etc/sftp-users.conf"
echo | file_put "$users_file"
rm -f "$SERVICE_DATASTORE/home/"*"/.ssh/authorized_keys"
[ "$users_def" ] || exit 0
rm -f "$users_file"
volume_keys=()
while read-0 login user_def; do
key_nb=0
@ -57,3 +60,4 @@ $(for volume in "${volume_keys[@]}"; do
echo " - $volume"
done)
"
Loading…
Cancel
Save