X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aaf%2Fauthz.git;a=blobdiff_plain;f=auth%2Funix%2FfirstAsRoot.sh;fp=auth%2Funix%2FfirstAsRoot.sh;h=8a66130b35c604e499254610ee75fab2a235fddf;hp=0000000000000000000000000000000000000000;hb=475da40b0d58acdf4dd1a3590c490ce7b95a1af8;hpb=861b557b294032f9443ee1fca6b42d7252e92481 diff --git a/auth/unix/firstAsRoot.sh b/auth/unix/firstAsRoot.sh new file mode 100644 index 00000000..8a66130b --- /dev/null +++ b/auth/unix/firstAsRoot.sh @@ -0,0 +1,20 @@ +# +. ./l.props +if [ -z "$1" ]; then + echo "Enter 'user:group' for the directory after creation" + read CHOWN +else + CHOWN="$1" +fi + + +for D in $INSTALL_DIR $ORG_DIR; do + if [ -e $D ]; then + echo "$D already exists" + else + mkdir -p $D + echo "$D created" + fi + echo "Setting Ownership of $D to $CHOWN" + chown $CHOWN $D +done