pkgs/nixfiles,pkgs/clerie-sops: Allow htpasswd edit the htpasswd file directly and therefor update existing entries
This commit is contained in:
@@ -31,12 +31,10 @@ fi
|
||||
|
||||
job_main="$(pwgen -1 64 1)"
|
||||
target_cyan="$(pwgen -1 64 1)"
|
||||
target_cyan_htpasswd="$(htpasswd -nbB "${host}" "${target_cyan}")"
|
||||
target_magenta="$(pwgen -1 64 1)"
|
||||
target_magenta_htpasswd="$(htpasswd -nbB "${host}" "${target_magenta}")"
|
||||
|
||||
echo "${target_cyan_htpasswd}" | clerie-sops-edit "hosts/clerie-backup/secrets.json" append "restic-server-cyan-htpasswd"
|
||||
echo "${target_magenta_htpasswd}" | clerie-sops-edit "hosts/backup-4/secrets.json" append "restic-server-magenta-htpasswd"
|
||||
echo "${target_cyan}" | clerie-sops-edit "hosts/clerie-backup/secrets.json" cmd "restic-server-cyan-htpasswd" htpasswd -iB "{}" "${host}"
|
||||
echo "${target_magenta}" | clerie-sops-edit "hosts/backup-4/secrets.json" cmd "restic-server-magenta-htpasswd" htpasswd -iB "{}" "${host}"
|
||||
|
||||
echo "Repo password main: ${job_main}"
|
||||
echo
|
||||
|
Reference in New Issue
Block a user