-
Notifications
You must be signed in to change notification settings - Fork 0
/
get
92 lines (81 loc) · 3.87 KB
/
get
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
#################################################
#
# Lazy Server
# Version 1.1a
# Copyright 2018, Veit <mail@geekmonkey.de>
#
# Tested: 18.03.2018
#
#################################################
######### DO NOT EDIT BELOW THIS LINE ##########
## xf0 Default
out="/dev/null"
mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
myname=$(basename $0)
string="$@"
# Colors
green='\e[92m'
red='\e[31m'
blue='\e[96m'
nc='\033[0m'
logo() {
echo -ne "
${blue}##########################################################################${nc}
${blue}##########################################################################${nc}
${blue}##${nc} ${blue}##${nc}
${blue}##${nc} +++++ '++++: ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}++++++++++++++++++++ ${blue}##${nc}
${blue}##${nc} @@@@@ ;@@@@# ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@@@@@@@@@@@@@@@@@ ${blue}##${nc}
${blue}##${nc} .@@@@@ ,@@@@# ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@@@@@@@@@@@@@@@@@ ${blue}##${nc}
${blue}##${nc} :@@@@@ .@@@@@ ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@@@@@@@@@@@@@@@@@ ${blue}##${nc}
${blue}##${nc} '@@@@@ @@@@@ ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@############@@@@ ${blue}##${nc}
${blue}##${nc} #@@@@+@@@@@ ${blue} ${nc}@@@@ @@@@ ${blue}##${nc}
${blue}##${nc} #@@@@@@@@ ${blue} ${nc}@@@@ @@@@ ${blue}##${nc}
${blue}##${nc} @@@@@@@ ${blue} ${nc}@@@@ @@@@ ${blue}##${nc}
${blue}##${nc} .@@@@@# ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@ @@@@ ${blue}##${nc}
${blue}##${nc} @@@@@@@ ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@ @@@@ ${blue}##${nc}
${blue}##${nc} @@@@@@@@@ ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@ @@@@ ${blue}##${nc}
${blue}##${nc} @@@@@ #@@@@. ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@ @@@@ ${blue}##${nc}
${blue}##${nc} @@@@@ @@@@@ ${blue}@@@@@@@@@@@@@@@@@@@@ ${nc}@@@@############@@@@ ${blue}##${nc}
${blue}##${nc} @@@@@ @@@@@ ${blue}@@@@ ${nc}@@@@@@@@@@@@@@@@@@@@ ${blue}##${nc}
${blue}##${nc} @@@@@, @@@@@ ${blue}@@@@ ${nc}@@@@@@@@@@@@@@@@@@@@ ${blue}##${nc}
${blue}##${nc} +@@@@' @@@@@ ${blue}@@@@ ${nc}@@@@@@@@@@@@@@@@@@@@ ${blue}##${nc}
${blue}##${nc} ${blue}##${nc}
${blue}##########################################################################${nc}
${blue}##########################################################################${nc}
"
echo -ne '\n'
}
prepare_system() {
echo -ne "Prepare System: >> ${blue}doing update ${nc}<<\r"
apt-get update > $out 2>&1
echo -ne "Prepare System: >> ${blue}install packages ${nc}<<\r"
apt-get install -y git > $out 2>&1
echo -ne "\033[2K" ; printf "\r"
echo -ne "Prepare System: [${blue}done${nc}]\r"
echo -ne '\n'
}
getting_files() {
echo ""
echo -ne "Prepare Files: >> ${blue}begin cloning ${nc}<<\r"
git clone --depth=1 https://github.com/gxf0/lazy_server.git > $out 2>&1
echo -ne "Prepare Files: >> ${blue}assign rights ${nc}<<\r"
chmod +x $mydir/lazy_server/installer > $out 2>&1
chmod +x $mydir/lazy_server/scripts/* > $out 2>&1
echo -ne "\033[2K" ; printf "\r"
echo -ne "Prepare Files: [${blue}done${nc}]\r"
echo -ne '\n'
}
give_info() {
echo ""
echo ""
echo -e "To run the installer, please use:${blue} $mydir/lazy_server/installer${nc}. "
echo -e "All scripts also can be used alone, one by one, you can find them here:${blue} $mydir/lazy_server/scripts${nc}"
}
main(){
logo
prepare_system
getting_files
give_info
}
main