-
Notifications
You must be signed in to change notification settings - Fork 92
/
gv.sh
47 lines (44 loc) · 1.8 KB
/
gv.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
#!/bin/bash
#URL: https://github.com/uselibrary/KeepMyGoogleVoice
clear
echo " ################################################"
echo " # #"
echo " # KeepMyGoogleVoice #"
echo " # https://pa.ci #"
echo " # Version 0.2 #"
echo " ################################################"
#download
wget --no-check-certificate -O gv.py https://raw.githubusercontent.com/uselibrary/KeepMyGoogleVoice/master/gv.py && chmod +x gv.py
mv gv.py /root/
#crontab
echo -e ""
echo -e "Prepare the environment."
if cat /etc/*-release | grep -Eqi "centos|red hat|redhat"; then
echo "RPM-based"
yum -y install epel-release
yum -y install python36
yum -y install python36-setuptools
easy_install-3.6 pip
pip3 install googlevoice
elif cat /etc/*-release | grep -Eqi "debian|ubuntu"; then
echo "Debian-based"
apt install python3
apt install python3-pip
pip3 install googlevoice
else
echo "OS is not supported"
echo "Please install gv.py manually"
fi
#service
# runing mode [crontab]
echo -ne '\n0 0 1 * * root python3 /root/gv.py \n\n' >>/etc/crontab
echo "Please input you email and passwords into /etc/gv.py"
echo "Finished"
# runing mode [systemd]
#a systemd service will replaces crontab to achieve better performance soon
#mkdir /etc/googlevoice
#cd /etc/googlevoice
#wget --no-check-certificate -O gv.py https://raw.githubusercontent.com/uselibrary/KeepMyGoogleVoice/master/gv.py && chmod +x gv.py
#cd /etc/systemd/system/
#wget --no-check-certificate -O googlevoice.service https://raw.githubusercontent.com/uselibrary/KeepMyGoogleVoice/master/googlevoice.service && chmod +x googlevoice.service
#systemctl enable googlevoice.service