Compare commits

..

2 Commits

Author SHA1 Message Date
tteckster 3db776e749
Update shinobi.sh
default Ubuntu 22.04
2023-09-14 07:42:39 -04:00
tteckster ff42ff1082
Update shinobi-install.sh
fixes https://github.com/tteck/Proxmox/issues/1792
2023-09-14 07:41:16 -04:00
2 changed files with 5 additions and 16 deletions

View File

@ -24,7 +24,6 @@ var_cpu="2"
var_ram="2048" var_ram="2048"
var_os="ubuntu" var_os="ubuntu"
var_version="22.04" var_version="22.04"
var_version="20.04"
variables variables
color color
catch_errors catch_errors

View File

@ -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