-
Notifications
You must be signed in to change notification settings - Fork 52
/
install
83 lines (64 loc) · 1.41 KB
/
install
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
#!/bin/bash
# general functions
function pause(){
read -p "$*"
}
function welcome(){
echo -e "Welcome to einDa-skin installer."
}
function bar(){
echo "========================================"
}
# login functions
function login(){
cd /usr/local/directadmin/data/templates/
rm $login
wget https://raw.githubusercontent.com/smicroz/einDa-skin/master/utils/login/login.html
}
# skin functions
function end(){
bar
echo "Congratulations!!, einDa-skin was installed"
bar
echo "Now go to http://yourdomain:2222 and"
echo "1 | Join admin account"
echo "2 | As reseller, go to the skin manager"
echo "3 | Select einDa-skin and apply to me"
bar
echo "Thanks for using einDa skin"
bar
}
function joinFolder(){
cd /usr/local/directadmin/data/skins/
}
function install(){
echo "Installing..."
git clone https://github.com/smicroz/einDa-skin.git
chown -R diradmin:diradmin einDa-skin/
}
function update(){
echo "Updating..."
git reset --hard
git pull
chown -R diradmin:diradmin *
}
# innit
bar
welcome
bar
joinFolder
directory=einDa-skin
login=./login.html
if [ -d "$directory" ]; then
echo "The directory einDa-skin already exists"
echo -e "\x1B[31m == UPDATE == \x1B[0m"
pause 'If you want update the skin, press [Enter] key for continue...'
cd $directory/
update
# install login template
login
else
pause 'Press [Enter] key for start installation...'
install
end
fi