forked from litecoin-foundation/LitecoinNode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux.sh
64 lines (57 loc) · 1.6 KB
/
linux.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
62
63
64
#!/bin/bash
#load global variables file
wget -q https://raw.githubusercontent.com/litecoin-association/LitecoinNode/master/glob-vars.sh -P /root
source /root/glob-vars.sh
rm -f -v /root/glob-vars.sh
#change working directory
cd $HOME
clear
echo ""
echo "-----------------------------------------------------------------------"
echo "version = $LITECOIN_VER_NO_BIT"
echo ""
echo "Welcome to the litecoinnode.org Litecoin full node script for Linux."
echo "This script will install, update or remove a Litecoin full node."
echo "We will ask you some questions do determine what we need to do."
echo "To start please select an option from the menu below."
echo "For more information or help visit http://litecoinnode.org"
echo ""
echo "-----------------------------------------------------------------------"
echo ""
#create operating system choice menu
PS3="Please select your choice: "
CHOICE=("Install" "Update" "Remove" "Exit")
select CHC in "${CHOICE[@]}"
do
case $CHC in
"Install")
wget $SCRIPT_DL_URL/linux-install.sh -P $HOME
source $HOME/linux-install.sh
rm -f -v linux.sh
#we are done. exit the script
exit
;;
"Update")
#define distribution
wget $SCRIPT_DL_URL/linux-update.sh -P $HOME
source $HOME/linux-update.sh
rm -f -v linux.sh
#we are done. exit the script
exit
;;
"Remove")
#define distribution
wget $SCRIPT_DL_URL/linux-remove.sh -P $HOME
source $HOME/linux-remove.sh
rm -f -v linux.sh
#we are done. exit the script
exit
;;
"Exit")
echo ""
rm -f /root/linux.sh
break
;;
*) echo "Invalid option.";;
esac
done