Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sciabarra
Created January 19, 2015 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sciabarra/030bcfc307ff82d57a86 to your computer and use it in GitHub Desktop.
Save sciabarra/030bcfc307ff82d57a86 to your computer and use it in GitHub Desktop.
Unattended installation for WebCenter Sites
#!/bin/bash
cd $(dirname $0)
BASE=$(pwd)
killall -9 java nc
echo "<<< deploying sites"
cd $BASE/Sites
rm out.log
touch out.log
nc -l 12345 | sh csInstall.sh -silent | tee out.log &
while ! tail -n 1 out.log | grep "press ENTER."
do sleep 1 ; echo ...deploying...
done
echo ">>> deploying sites"
echo "<<< starting tomcat"
cd $BASE/apache-tomcat-*/bin
sh ./startup.sh
while ! wget -q -O- http://localhost:8181/cs/HelloCS | grep reason=Success
do echo "...starting..." ; sleep 1
done
echo ">>> started tomcat"
echo "<<< installing sites"
cd $BASE/Sites
echo | nc localhost 12345
while ! tail -n 1 out.log | grep "Installation Finished Successfully"
do sleep 1 ; echo ...installing...
done
echo ">>> installed sites"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment