Update shinobi-install.sh
fixes https://github.com/tteck/Proxmox/issues/1792
This commit is contained in:
parent
b651b404f6
commit
ff42ff1082
1 changed files with 5 additions and 15 deletions
|
@ -13,15 +13,6 @@ setting_up_container
|
||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
ubuntuversion=$(lsb_release -r | awk '{print $2}' | cut -d . -f1)
|
|
||||||
if [ "$ubuntuversion" = "18" ] || [ "$ubuntuversion" -le "18" ]; then
|
|
||||||
apt install sudo wget -y
|
|
||||||
sudo apt install -y software-properties-common
|
|
||||||
sudo add-apt-repository universe -y
|
|
||||||
apt update -y
|
|
||||||
apt update --fix-missing -y
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl sudo git mc
|
$STD apt-get install -y curl sudo git mc
|
||||||
$STD apt-get install -y make zip net-tools
|
$STD apt-get install -y make zip net-tools
|
||||||
|
@ -57,21 +48,20 @@ echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$git
|
||||||
msg_ok "Cloned Shinobi"
|
msg_ok "Cloned Shinobi"
|
||||||
|
|
||||||
msg_info "Installing Database"
|
msg_info "Installing Database"
|
||||||
sqlpass=""
|
sqluser="root"
|
||||||
|
sqlpass="root"
|
||||||
echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections
|
echo "mariadb-server mariadb-server/root_password password $sqlpass" | debconf-set-selections
|
||||||
echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections
|
echo "mariadb-server mariadb-server/root_password_again password $sqlpass" | debconf-set-selections
|
||||||
$STD apt-get install -y mariadb-server
|
$STD apt-get install -y mariadb-server
|
||||||
service mysql start
|
service mysql start
|
||||||
sqluser="root"
|
mysql -u "$sqluser" -p"$sqlpass" -e "source sql/user.sql" || true
|
||||||
mysql -e "source sql/user.sql" || true
|
|
||||||
mysql -e "source sql/framework.sql" || true
|
|
||||||
msg_ok "Installed Database"
|
msg_ok "Installed Database"
|
||||||
|
|
||||||
|
msg_info "Installing Shinobi"
|
||||||
cp conf.sample.json conf.json
|
cp conf.sample.json conf.json
|
||||||
cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}')
|
cronKey=$(head -c 1024 < /dev/urandom | sha256sum | awk '{print substr($1,1,29)}')
|
||||||
sed -i -e 's/Shinobi/'"$cronKey"'/g' conf.json
|
sed -i -e 's/Shinobi/'"$cronKey"'/g' conf.json
|
||||||
cp super.sample.json super.json
|
cp super.sample.json super.json
|
||||||
|
|
||||||
msg_info "Installing Shinobi"
|
|
||||||
$STD npm i npm -g
|
$STD npm i npm -g
|
||||||
$STD npm install --unsafe-perm
|
$STD npm install --unsafe-perm
|
||||||
$STD npm install pm2@latest -g
|
$STD npm install pm2@latest -g
|
||||||
|
|
Loading…
Reference in a new issue