X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=conflink;h=bfd4e448814e38414c9f0ced5fdedcbfbf7256e4;hb=e958999a4ab6fddd723270b596b4899c0811fa41;hp=90debe6b171cf265649c79cce60b70cfdfc88f04;hpb=608a1255fc3700611bdabdc9c8635940ac3390af;p=distro-setup diff --git a/conflink b/conflink index 90debe6..bfd4e44 100755 --- a/conflink +++ b/conflink @@ -166,15 +166,24 @@ case $user in if [[ -e /var/lib/znc ]] && getent group znc; then s chown -R znc:znc /var/lib/znc fi - f=/etc/prometheus-htpasswd + for f in /etc/prometheus-{,export-}htpasswd; do + if [[ -e $f ]]; then + s chmod 640 $f + if getent passwd www-data; then + s chown root:www-data $f + fi + fi + done + f=/etc/prometheus-pass if [[ -e $f ]]; then + # note: this is duplicative of the file's own permissions s chmod 640 $f /etc/prometheus-pass - s chown root:www-data $f if getent passwd prometheus; then - s chown root:prometheus /etc/prometheus-pass + s chown root:prometheus $f fi fi + ##### end special extra stuff ##### m sudo -H -u user2 "${BASH_SOURCE[0]}"