Current File : //etc/zpanel/panel/nodejsinstallation.sh
echo -e "--------------------------------"
echo -e "1.Node.js 6"
echo -e "2.Node.js 8"
echo -e "--------------------------------"
echo -e "Enter your option >"
read javaversion
case "$javaversion" in
1) 
curl --silent --location http://hostingraja.info/nodejs/setup_6.x | sudo bash -
;;
2) 
curl --silent --location http://hostingraja.info/nodejs/setup_8.x | sudo bash -
    ;;
*) echo -e "You have entered wrong option. Try aftesometime"
	exit
   ;;
esac
yum -y install nodejs git  gcc-c++ make
npm install -g pm2
npm install -g grunt-cli
npm install -g gulp
npm install webpack -g
#cd /etc/sentora/
#rm -f /etc/sentora/panel.zip
#wget  "http://hostingraja.info/nodejs/panel.zip"
#unzip -o panel.zip
#rm -f /etc/sentora/panel.zip
chown apache. -R "/etc/sentora/panel"
find /etc/sentora/panel -type f -exec chmod 644 {} +
find /etc/sentora/panel -type d -exec chmod 755 {} +
chmod +x /etc/sentora/panel/bin/setso
chmod +x /etc/sentora/panel/bin/zsudo
chmod +x /etc/sentora/panel/bin/setzadmin
wget  "http://hostingraja.info/Version2.0/nodejsmoduleenable.zip"
unzip -o nodejsmoduleenable.zip
php nodejsmoduleenable.php
rm -frv  nodejsmoduleenable.zip
kill -9 $(lsof -t -i:80)
kill -9 $(lsof -t -i:8080)
#php /etc/sentora/panel/node.php
setso --set apache_port 80
setso --set sentora_port 80
php /etc/sentora/panel/bin/daemon.php
service lighttpd restart
service varnish stop
service httpd restart
chkconfig varnish off