diff options
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 23 | ||||
-rw-r--r-- | conf.json | 20 | ||||
-rw-r--r-- | shinobi.install | 31 |
4 files changed, 49 insertions, 30 deletions
@@ -1,6 +1,6 @@ pkgbase = shinobi-git pkgdesc = The Open Source CCTV and NVR Solution - pkgver = r2106.a2faa40 + pkgver = r3116.07584db3 pkgrel = 1 url = https://shinobi.video/ install = shinobi.install @@ -9,7 +9,6 @@ pkgbase = shinobi-git makedepends = npm makedepends = git depends = ffmpeg - depends = mariadb depends = nodejs provides = shinobi options = !strip @@ -29,7 +28,7 @@ pkgbase = shinobi-git sha256sums = 676111c7502ed43671ac5a4451ee0f89913de1c4b4f1e2120cd5c4b89e842757 sha256sums = e7c849bfcf8619a093ec75467cf5e44b34cd3621fa0d639bfacf4c88e0bad258 sha256sums = a0213eb276dfd468ed835cccceece75da92141716afa4c2426e20a06f64b5625 - sha256sums = 45c64bdaf8e7c99f14a8467fc3c996fefdaab8c100c9f28f03054c248f62a7d3 + sha256sums = a328e61ddb909cc0216569ed08ee5f4e35ce770da53995ab7d6413479ae8e106 sha256sums = b6f2093025736770ed18141eee36b2cd2507142310bb258bf6365c4740c9aae6 pkgname = shinobi-git @@ -1,15 +1,18 @@ # Maintainer: AlphaJack <alphajack at tuta dot io> pkgname="shinobi-git" -pkgver=r2106.a2faa40 +pkgver=r3116.07584db3 pkgrel=1 pkgdesc="The Open Source CCTV and NVR Solution" url="https://shinobi.video/" license=("custom") # not free for commercial use arch=("any") provides=("shinobi") -depends=("ffmpeg" "mariadb" "nodejs") +depends=("ffmpeg" "nodejs") makedepends=("npm" "git") +optdepents=("mariadb: database" + "postgresql: database" + ) source=("git+https://gitlab.com/Shinobi-Systems/Shinobi.git" "shinobi-camera.service" "shinobi-cron.service" @@ -24,7 +27,7 @@ sha256sums=('SKIP' '676111c7502ed43671ac5a4451ee0f89913de1c4b4f1e2120cd5c4b89e842757' 'e7c849bfcf8619a093ec75467cf5e44b34cd3621fa0d639bfacf4c88e0bad258' 'a0213eb276dfd468ed835cccceece75da92141716afa4c2426e20a06f64b5625' - '45c64bdaf8e7c99f14a8467fc3c996fefdaab8c100c9f28f03054c248f62a7d3' + 'a328e61ddb909cc0216569ed08ee5f4e35ce770da53995ab7d6413479ae8e106' 'b6f2093025736770ed18141eee36b2cd2507142310bb258bf6365c4740c9aae6') backup=("etc/shinobi/conf.json" "etc/shinobi/super.json") install="shinobi.install" @@ -32,15 +35,9 @@ options=("!strip") pkgver(){ cd "Shinobi" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - -prepare(){ - cd "Shinobi" - # avoid hardcode database name - sed -i "sql/framework.sql" \ - -e 's|CREATE DATABASE|-- CREATE DATABASE|' \ - -e 's|USE `ccio`;|-- USE `ccio`|' + # git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' # -> fatal: No annotated tags can describe '07584db326ba8077f448a8383cc677469a769cbf'. + # git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' # -> furrykitten.3.r534.g07584db3 + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" # -> r3116.07584db3 } package(){ @@ -48,6 +45,7 @@ package(){ cd "Shinobi" # program files npm install --user root + npm install --user root pg install -d "$pkgdir/usr/share/shinobi" cp -r * "$pkgdir/usr/share/shinobi" # configuration files @@ -65,5 +63,6 @@ package(){ # custom license install -D -m 644 "LICENSE.md" "$pkgdir/usr/share/licenses/shinobi/LICENSE" # version.json is used by the web server + # https://gitlab.com/Shinobi-Systems/Shinobi/-/issues/23 echo '{"Product" : "Shinobi Professional (Pro)" , "Branch" : "master" , "Version" : "'"$(git rev-parse HEAD)"'" , "Date" : "'"$(date)"'" , "Repository" : "https://gitlab.com/Shinobi-Systems/Shinobi"}' > "$pkgdir/usr/share/shinobi/version.json" } diff --git a/conf.json b/conf.json index 19d71b621284..07948979b190 100644 --- a/conf.json +++ b/conf.json @@ -1,12 +1,21 @@ { "ip": "127.0.0.1", "port": 8080, + "debugLog": false, + "enableFaceManager": false, + "videosDir": "/var/lib/shinobi/video", + "streamDir": "/var/lib/shinobi/stream", + "binDir": "/var/lib/shinobi/files", "passwordType": "sha256", "detectorMergePamRegionTriggers": true, "wallClockTimestampAsDefault": true, - "streamDir": "/var/lib/shinobi/stream", - "videosDir": "/var/lib/shinobi/video", - "binDir": "/var/lib/shinobi/files", + "useBetterP2P": true, + "smtpServerOptions": { + "allowInsecureAuth": true + }, + "addStorage": [ + {"name":"second","path":"__DIR__/videos2"} + ], "db": { "host": "127.0.0.1", "user": "majesticflame", @@ -21,8 +30,7 @@ "pass": "your_password_or_app_specific_password" } }, - "cron":{ - "key":"change_this_to_something_very_random__just_anything_other_than_thisx" - }, + "cron":{}, "pluginKeys":{} } + diff --git a/shinobi.install b/shinobi.install index 1a701b5ecf72..763b6983d36b 100644 --- a/shinobi.install +++ b/shinobi.install @@ -1,20 +1,33 @@ post_install(){ cat << INFO -Shinobi is free for personal use, read the following if you plan to use it -for commercial purpose: https://hub.shinobi.video/articles/view/QDD2cqvbTekzhar +Shinobi is free for personal use, read the following if you plan to use it for commercial purpose: -Before using Shinobi you need to create a mariadb user and database. -Then you need to import the structure into the database, e.g. with + https://hub.shinobi.video/articles/view/QDD2cqvbTekzhar - sudo mysql DATABASE < /usr/share/shinobi/sql/framework.sql +Before using Shinobi you need to create a database with either mariadb or postgresql, and a dedicate database user for shinobi. +Then you can import the required database structure for mariadb with: -Once you have granted your user full access to the new database, configure the files under "/etc/shinobi" accordingly. -You can change your super admin password in /etc/shinobi/super.json with + sudo mariadb -u root -p <<QUERY +CREATE DATABASE IF NOT EXISTS `ccio`; +CREATE USER 'majesticflame'@'127.0.0.1' IDENTIFIED BY ''; +GRANT ALL PRIVILEGES ON ccio.* TO 'majesticflame'@'127.0.0.1'; +FLUSH PRIVILEGES; +QUERY - echo -n PASSWORD | md5sum +or for postgresql with: -Once you have done all of the above, you can start the required services with + sudo su - postgres + psql -c "create database shinobi" + createuser -p shinobi + createdb --owner shinobi --encoding='utf-8' shinobi + +You need to configure the files under "/etc/shinobi" accordingly. +You can change your super admin password in /etc/shinobi/super.json with a new one generated with: + + printf "PASSWORD" | md5sum + +Once you have done all of the above, you can start the required services with: sudo systemctl start shinobi.target |