aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorU-AD\carlsoan <carlsoan@gophersjos7275.ad.uc.edu>2017-03-13 13:43:35 -0400
committerU-AD\carlsoan <carlsoan@gophersjos7275.ad.uc.edu>2017-03-13 13:43:35 -0400
commit8512370cc8f727fa65fe930a3471a148fae37034 (patch)
tree7458f6492ca5c49161548383f25d2a35917203a3
parent2b7b113bd264dee9809d4421c98644ceb4fd4bab (diff)
Created makefile to replace shell scripts
-rw-r--r--init.sh18
-rw-r--r--modrepo.sh39
2 files changed, 0 insertions, 57 deletions
diff --git a/init.sh b/init.sh
deleted file mode 100644
index ba6ce5a..0000000
--- a/init.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-read -p "Server Protocol [http]: " proto
-[[ -z "$proto" ]] && proto="http"
-
-read -p "Enter host and port [localhost:8080]: " hostport
-[[ -z "$hostport" ]] && hostport="localhost:8080"
-
-read -p "Enter username [admin]: " slinguser
-[[ -z "$slinguser" ]] && slinguser="admin"
-
-read -p "Enter password [admin]: " slingpass
-[[ -z "$slingpass" ]] && slingpass="admin"
-
-echo "PROTO $proto" > server.txt
-echo "HOST $hostport" >> server.txt
-echo "USER $slinguser" >> server.txt
-echo "PASS $slingpass" >> server.txt
-
-curl -s $proto://$hostport/system/userManager/user.1.json | sed 's/}$/\n}/;s/^{/{\n/g;s/},/},\n/g' | awk 'BEGIN { FS=":" } { print $1 }' | egrep -v '{|}' | sed 's/"//g' | grep -v anonymous > userlist.txt
diff --git a/modrepo.sh b/modrepo.sh
deleted file mode 100644
index b6c5cd7..0000000
--- a/modrepo.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-proto=$(cat server.txt | grep '^PROTO' | sed 's/^PROTO //g')
-hostport=$(cat server.txt | grep '^HOST' | sed 's/^HOST //g')
-slinguser=$(cat server.txt | grep '^USER' | sed 's/^USER //g')
-slingpass=$(cat server.txt | grep '^PASS' | sed 's/^PASS //g')
-
-printf "Creating /apps/users..."
-curl -s -u $slinguser:$slingpass -X MKCOL $proto://$hostport/apps/users > /dev/null
-printf "done\n"
-
-printf "Creating /apps/users/password..."
-curl -s -u $slinguser:$slingpass -X MKCOL $proto://$hostport/apps/users/edit > /dev/null
-printf "done\n"
-
-printf "Creating /apps/users/create..."
-curl -s -u $slinguser:$slingpass -X MKCOL $proto://$hostport/apps/users/manage > /dev/null
-printf "done\n"
-
-printf "Creating /content/usermgr..."
-curl -s -u $slinguser:$slingpass -X MKCOL $proto://$hostport/content/newuser > /dev/null
-printf "done\n"
-
-printf "Uploading /apps/users/password HTML..."
-curl -s -u $slinguser:$slingpass -T useredit.html $proto://$hostport/apps/users/edit/html.esp > /dev/null
-printf "done\n"
-
-printf "Uploading /apps/users/create HTML..."
-curl -s -u $slinguser:$slingpass -T usermgr.html $proto://$hostport/apps/users/manage/html.esp > /dev/null
-printf "done\n"
-
-printf "Setting attributes for /content/usermgr..."
-curl -s -u $slinguser:$slingpass -F"sling:resourceType=users/manage" $proto://$hostport/content/usermgr > /dev/null
-printf "done\n"
-
-cat userlist.txt | while read user; do
- printf "Setting attributes for /home/users/${user:0:1}/${user}..."
- curl -s -u $slinguser:$slingpass -F"sling:resourceType=users/edit" $proto://$hostport/home/users/${user:0:1}/$user.html > /dev/null
- curl -s -u $slinguser:$slingpass -F"uid=$user" $proto://$hostport/home/users/${user:0:1}/$user.html > /dev/null
- printf "done\n"
-done