How to Update Shinobi
Updating Shinobi from the Superuser panel or command line is easy.
Update from Superuser Panel
-
Login to the Superuser panel.
- Don't remember how to login to the Superuser panel? See this article about First Login.
- Navigate to the Controls and Logs tab.
- Press Update. Wait for the process to complete.
- Restart Core.
Update from Command Line
You must become root or the user that installed Shinobi before completing these steps.
sudo su
1. If your Shinobi is installed in the default location then you can open a terminal window and navigate to the Shinobi folder in /home.
cd /home/Shinobi
2. Run the following commands to run the update process with Git.
sh UPDATE.sh
This will overwrite any changes you have made to the core files. Your configuration files will not be affected. Sample configuration files may change.
2a. Clear old Logs. This should be done every time an update is done but is not a requirement. It only serves to make debugging any potential problems easier.
pm2 flush
3. Then restart Shinobi to activate the changes.
pm2 restart camera pm2 restart cron
Updating from Dashboard v2 to Dashboard v3
It's easy to migrate to the new framework. When you run the update steps once you will have a new file in your Shinobi root folder called UPDATE-v2-to-v3.sh. Run the following to execute it.
sh UPDATE-v2-to-v3.sh
This will update your Node.js version to v16 as well.
How to turn your Shinobi folder into a Git folder
If you do not have Git you can do this on Ubuntu
apt install git
or this on CentOS
yum install git
1. Run the following inside your Shinobi folder to convert it to a Git repo folder.
cd .. git clone https://gitlab.com/Shinobi-Systems/Shinobi.git temp mv temp/.git Shinobi/.git rm -rf temp
2. You don't need to restart Shinobi unless you decide to update.