Update createdb_bullseye.sh
This commit is contained in:
@@ -7,22 +7,7 @@
|
|||||||
# If using this script to re-initialize (DROP then CREATE)
|
# If using this script to re-initialize (DROP then CREATE)
|
||||||
# the DB, be sure to run this as root or with sudo
|
# the DB, be sure to run this as root or with sudo
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
mysql_secure_installation << EOF
|
sqlite3 /home/pi/BirdNET-Pi/scripts/birds.db << EOF
|
||||||
|
|
||||||
y
|
|
||||||
n
|
|
||||||
y
|
|
||||||
y
|
|
||||||
y
|
|
||||||
y
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mysql << EOF
|
|
||||||
DROP DATABASE IF EXISTS birds;
|
|
||||||
CREATE DATABASE IF NOT EXISTS birds;
|
|
||||||
|
|
||||||
USE birds;
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS detections (
|
CREATE TABLE IF NOT EXISTS detections (
|
||||||
Date DATE,
|
Date DATE,
|
||||||
Time TIME,
|
Time TIME,
|
||||||
@@ -34,13 +19,6 @@ CREATE TABLE IF NOT EXISTS detections (
|
|||||||
Cutoff FLOAT,
|
Cutoff FLOAT,
|
||||||
Week INT,
|
Week INT,
|
||||||
Sens FLOAT,
|
Sens FLOAT,
|
||||||
Overlap FLOAT);
|
Overlap FLOAT,
|
||||||
GRANT ALL ON birds.* TO 'birder'@'localhost' IDENTIFIED BY '${DB_PWD}' WITH GRANT OPTION;
|
File_Name VARCHAR(100) NOT NULL);
|
||||||
FLUSH PRIVILEGES;
|
|
||||||
exit
|
|
||||||
EOF
|
EOF
|
||||||
sudo -u${USER} sed -i "s/databasepassword/${DB_PWD}/g" /home/pi/BirdNET-Pi/scripts/server.py
|
|
||||||
sed -i "s/mysqli.default_host =.*/mysqli.default_host = localhost/g" /etc/php/7.4/fpm/php.ini
|
|
||||||
sed -i "s/mysqli.default_user =.*/mysqli.default_user = birder/g" /etc/php/7.4/fpm/php.ini
|
|
||||||
sed -i "s/mysqli.default_pw =.*/mysqli.default_pw = ${DB_PWD}/g" /etc/php/7.4/fpm/php.ini
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user