-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall-spm.sh
62 lines (59 loc) · 2.14 KB
/
install-spm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
clear
echo "-------------------------------------------------------------------------"
echo "Preparando diretório"
sudo rm -r /opt/tklweb-cp
sudo mkdir /opt/tklweb-cp
cd /opt/tklweb-cp
echo "OK"
clear
echo "-------------------------------------------------------------------------"
echo "Instalando Node.js"
echo "-------------------------------------------------------------------------"
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs
hash -r
npm install -g n
clear
echo "-------------------------------------------------------------------------"
echo "Baixando ISPTools"
echo "-------------------------------------------------------------------------"
apt-get install git
git init
git remote add origin https://[email protected]/giovaneh/isptools.git
git pull origin master
npm install
echo "OK"
clear
echo "-------------------------------------------------------------------------"
echo "Instalando PM2"
echo "-------------------------------------------------------------------------"
npm install pm2 -g
echo "OK"
clear
echo "-------------------------------------------------------------------------"
echo "Startando PM2"
echo "-------------------------------------------------------------------------"
rm /etc/init.d/pm2-init.sh
pm2 kill
sudo pm2 start app.js -x -f -i 1 --name ISPTools
echo "OK"
clear
echo "-------------------------------------------------------------------------"
echo "Daemon PM2"
echo "-------------------------------------------------------------------------"
sudo pm2 -f startup ubuntu
echo "OK"
clear
echo "-------------------------------------------------------------------------"
echo "FIM - www.isptools.com.br"
echo "-------------------------------------------------------------------------"
echo "Agora nos envie um email para que possamos adicionar ao site."
echo "[email protected]"
echo ""
echo "Obrigado!"
echo "Giovane Heleno"
echo "-------------------------------------------------------------------------"
## wget -qO- https://bitbucket.org/giovaneh/isptools/raw/master/install.sh | sh