X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/blobdiff_plain/8791f670423694477bde27abae7fc48ce4a83d47..7e1859cd077e582c5cc098bbecf6c2a1466632cf:/create-user diff --git a/create-user b/create-user index 85dc6c3..ff57c9d 100755 --- a/create-user +++ b/create-user @@ -19,6 +19,16 @@ if test -z "$USER"; then exit 1 fi +# +# Helper functions +# + +# Run a command on both mire and deleuze; assumes that no escaping is +# needed. +function mire_and_deleuze() { + $* + ssh mire.hcoop.net $* +} # # Kerberos principals @@ -220,15 +230,14 @@ vos syncserv deleuze vos syncvldb deleuze # refresh volume location cache (takes ~2hrs otherwise) -fs checkvolumes -ssh mire.hcoop.net fs checkvolumes +mire_and_deleuze fs checkvolumes # -# Files and directories on deleuze +# Non-AFS files and directories # # Make per-user apache DAV lock directory -- the directory must be # both user and group-writable, which is silly. -sudo mkdir -p /var/lock/apache2/dav/$USER -sudo chown $USER:www-data /var/lock/apache2/dav/$USER -sudo chmod ug=rwx,o= /var/lock/apache2/dav/$USER +mire_and_deleuze sudo mkdir -p /var/lock/apache2/dav/$USER +mire_and_deleuze sudo chown $USER:www-data /var/lock/apache2/dav/$USER +mire_and_deleuze sudo chmod ug=rwx,o= /var/lock/apache2/dav/$USER