input=$1
if [ $input = "ip" ]
then
ifconfig|grep -w inet
elif [ $input = "ip6" ]
then
ifconfig|grep inet6
elif [ $input = "mac" ]
then
ifconfig|grep HWaddr
elif [ $input = "broadcast" ]
then
ifconfig|grep broadcast
elif [ $input = "mask" ]
then
ifconfig|grep mask
elif [ $input = "data" ]
then
ifconfig|grep bytes
elif [ $input = "help" ]
then
echo "ip"
echo "ip6"
echo "mac"
echo "broadcast"
echo "mask"
echo "data"
echo "help"
else
echo "others"
fi
Tuesday, September 8, 2015
Monday, August 3, 2015
Project start shell script
input=$1
if [ $input = "stop" ]
then
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/shutdown.sh
#echo pbharti|sudo -S service apache2 stop
elif [ $input = "restart" ]
then
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/shutdown.sh
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/catalina.sh jpda start
#sudo service apache2 restart
elif [ $input = "deploy" ]
then
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/shutdown.sh
echo "--Apache shudown"
#rm -r /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/cityguide
#rm -r /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/cityguideSchedular
rm -r /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/MultilingualServiceImpl.war
rm -r /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/MultilingualServiceImpl
sleep 3s
echo "--WebApp removed from tomcat"
cp -r /home/lovebharti/Yatra/Multilingual/MultilingualServiceImpl/trunk/target/MultilingualServiceImpl.war /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/MultilingualServiceImpl.war
sleep 3s
echo "--WebApp copied from target"
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/catalina.sh jpda start
echo "restarting apache... "
sleep 1s
#terminal -e sh showLog.sh
echo "starting tomcat in debug mode"
sleep 1s
#tail -f /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/logs/catalina.out
echo "cleaning logs"
> /home/lovebharti/YT/var/log/Multilingual/Multilingual.log
echo "showing log"
tail -f /home/lovebharti/YT/var/log/Multilingual/Multilingual.log
echo "showing tomcat output"
else
echo "others"
fi
#sh multilingual.sh start/stop/restart
if [ $input = "stop" ]
then
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/shutdown.sh
#echo pbharti|sudo -S service apache2 stop
elif [ $input = "restart" ]
then
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/shutdown.sh
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/catalina.sh jpda start
#sudo service apache2 restart
elif [ $input = "deploy" ]
then
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/shutdown.sh
echo "--Apache shudown"
#rm -r /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/cityguide
#rm -r /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/cityguideSchedular
rm -r /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/MultilingualServiceImpl.war
rm -r /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/MultilingualServiceImpl
sleep 3s
echo "--WebApp removed from tomcat"
cp -r /home/lovebharti/Yatra/Multilingual/MultilingualServiceImpl/trunk/target/MultilingualServiceImpl.war /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/webapps/MultilingualServiceImpl.war
sleep 3s
echo "--WebApp copied from target"
sh /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/bin/catalina.sh jpda start
echo "restarting apache... "
sleep 1s
#terminal -e sh showLog.sh
echo "starting tomcat in debug mode"
sleep 1s
#tail -f /home/lovebharti/Yatra/installed/apache-tomcat-7.0.61/logs/catalina.out
echo "cleaning logs"
> /home/lovebharti/YT/var/log/Multilingual/Multilingual.log
echo "showing log"
tail -f /home/lovebharti/YT/var/log/Multilingual/Multilingual.log
echo "showing tomcat output"
else
echo "others"
fi
#sh multilingual.sh start/stop/restart
Subscribe to:
Posts (Atom)