-
Notifications
You must be signed in to change notification settings - Fork 5
/
Install_Tools.sh
35 lines (27 loc) · 1.06 KB
/
Install_Tools.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
#!/bin/bash
# Made by Steven Sullivan
# Copyright Steven Sullivan Ltd
# Version: 1.1
if [ "x$(id -u)" != 'x0' ]; then
echo 'Error: this script can only be executed by root'
exit 1
fi
echo "Let's start..."
# Let's install the CSF Vesta UI!
function InstallVestaCPFrontEnd()
{
echo "Install VestaCP Front..."
mkdir /usr/local/vesta/web/list/tools
wget https://raw.githubusercontent.com/SS88UK/VestaCP-Tools-Plugin/master/index.php -O /usr/local/vesta/web/list/tools/index.php
# Chmod files
find /usr/local/vesta/web/list/tools -type d -exec chmod 755 {} \;
find /usr/local/vesta/web/list/tools -type f -exec chmod 644 {} \;
# Add the link to the panel.html file
if grep -q 'Tools' /usr/local/vesta/web/templates/admin/panel.html; then
echo 'Already there.'
else
sed -i '/<div class="l-menu clearfix noselect">/a <div class="l-menu__item <?php if($TAB == "TOOLS" ) echo "l-menu__item--active" ?>"><a href="/list/tools/"><?=__("Tools")?></a></div>' /usr/local/vesta/web/templates/admin/panel.html
fi
echo "Done! Check VestaCP!";
}
InstallVestaCPFrontEnd