mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-11 16:37:37 +00:00
[core] Rebase Scripts (formatting, highlighting & remove old deps) (#3378)
* Big Refactor: Remove Deps / Formatting & Correct End Of Line Sequence * f
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://shinobi.video/
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
@ -14,8 +14,7 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$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 git
|
||||
$STD apt-get install -y gcc g++ cmake
|
||||
$STD apt-get install -y ca-certificates
|
||||
$STD apt-get install -y gnupg
|
||||
@ -44,7 +43,7 @@ gitVersionNumber=$(git rev-parse HEAD)
|
||||
theDateRightNow=$(date)
|
||||
touch version.json
|
||||
chmod 777 version.json
|
||||
echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' > version.json
|
||||
echo '{"Product" : "'"Shinobi"'" , "Branch" : "'"master"'" , "Version" : "'"$gitVersionNumber"'" , "Date" : "'"$theDateRightNow"'" , "Repository" : "'"https://gitlab.com/Shinobi-Systems/Shinobi.git"'"}' >version.json
|
||||
msg_ok "Cloned Shinobi"
|
||||
|
||||
msg_info "Installing Database"
|
||||
@ -59,7 +58,7 @@ msg_ok "Installed Database"
|
||||
|
||||
msg_info "Installing Shinobi"
|
||||
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
|
||||
cp super.sample.json super.json
|
||||
$STD npm i npm -g
|
||||
@ -68,7 +67,7 @@ $STD npm install pm2@latest -g
|
||||
chmod -R 755 .
|
||||
touch INSTALL/installed.txt
|
||||
ln -s /opt/Shinobi/INSTALL/shinobi /usr/bin/shinobi
|
||||
node /opt/Shinobi/tools/modifyConfiguration.js addToConfig="{\"cron\":{\"key\":\"$(head -c 64 < /dev/urandom | sha256sum | awk '{print substr($1,1,60)}')\"}}" &>/dev/null
|
||||
node /opt/Shinobi/tools/modifyConfiguration.js addToConfig="{\"cron\":{\"key\":\"$(head -c 64 </dev/urandom | sha256sum | awk '{print substr($1,1,60)}')\"}}" &>/dev/null
|
||||
$STD pm2 start camera.js
|
||||
$STD pm2 start cron.js
|
||||
$STD pm2 startup
|
||||
|
Reference in New Issue
Block a user