From: Clinton Ebadi Date: Sat, 15 Dec 2018 17:24:10 +0000 (-0500) Subject: misc updates X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/commitdiff_plain/5912f6af1fbecffa968da8cf54a17cb84468f4a5 misc updates use new hostnames, sudo instead of su, etc. --- diff --git a/destroy-user b/destroy-user index d53cbb6..1879ec1 100755 --- a/destroy-user +++ b/destroy-user @@ -93,6 +93,6 @@ vos syncvldb fritz fs checkvolumes # Remove user from all of our mailing lists -echo $USER@hcoop.net | ssh -K deleuze sudo -u list \ +echo $USER@hcoop.net | ssh -K mccarthy sudo -u list \ /var/lib/mailman/bin/remove_members --fromall -f - diff --git a/hcoop-backup-wrapper b/hcoop-backup-wrapper index 42f7205..56c2fee 100755 --- a/hcoop-backup-wrapper +++ b/hcoop-backup-wrapper @@ -3,7 +3,7 @@ exec >& /var/log/backup-to-rsync-wrapper-log touch /xyz/zys # generate an error message -#exit 1 # temporary until disk space issues are solved +exit 1 # temporary because deleuze's disks will barf if we run this fs checkvol LOG=/var/log/backup-to-rsync-log diff --git a/listnew b/listnew index 9040cc7..1236596 100755 --- a/listnew +++ b/listnew @@ -1,6 +1,6 @@ #!/bin/bash -e # -# Make a new mailing list. Run as root on deleuze. +# Make a new mailing list. Run as user in sudoers on mccarthy. # # Usage: listnew LISTNAME LISTDOMAIN LISTURL USER INITIAL_PASSWORD diff --git a/mailman-update-exim-db b/mailman-update-exim-db index 3dcfacd..414a6a0 100755 --- a/mailman-update-exim-db +++ b/mailman-update-exim-db @@ -30,7 +30,7 @@ fi # Iterate through available lists for i in $(find $LISTDIR -mindepth 1 -maxdepth 1 -type d -print); do LIST=$(basename $i) - DOMAIN=$(su list -c "$BINDIR/config_list -o - $LIST" | \ + DOMAIN=$(sudo -u list $BINDIR/config_list -o - $LIST | \ grep -E "^host_name = '.+'" 2>/dev/null | \ sed -r -e "s/host_name = '(.+)'/\\1/") if test -n "$LIST" && test -n "$DOMAIN"; then diff --git a/re-create-all-users b/re-create-all-users index 19baf5a..4e1c3ee 100755 --- a/re-create-all-users +++ b/re-create-all-users @@ -4,5 +4,5 @@ for A in /afs/hcoop.net/user/?/??/* do \ echo re-creating `basename $A` (echo $A | grep _admin) || \ - /afs/hcoop.net/common/etc/scripts/create-user `basename $A` || exit -1 -done \ No newline at end of file + /afs/hcoop.net/common/etc/scripts/create-user-new `basename $A` || exit -1 +done