fixing clear_all_data errors
This commit is contained in:
@@ -24,7 +24,7 @@ echo "Creating necessary directories"
|
|||||||
|
|
||||||
sudo -u ${USER} ln -fs $(dirname ${my_dir})/homepage/* ${EXTRACTED}
|
sudo -u ${USER} ln -fs $(dirname ${my_dir})/homepage/* ${EXTRACTED}
|
||||||
sudo -u ${USER} ln -fs $(dirname ${my_dir})/model/labels.txt ${my_dir}/
|
sudo -u ${USER} ln -fs $(dirname ${my_dir})/model/labels.txt ${my_dir}/
|
||||||
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts ${EXTRACTED}
|
sudo -u ${USER} ln -fs $(dirname ${my_dir}) ${EXTRACTED}
|
||||||
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/play.php ${EXTRACTED}
|
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/play.php ${EXTRACTED}
|
||||||
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/spectrogram.php ${EXTRACTED}
|
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/spectrogram.php ${EXTRACTED}
|
||||||
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/overview.php ${EXTRACTED}
|
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/overview.php ${EXTRACTED}
|
||||||
@@ -37,10 +37,10 @@ sudo -u ${USER} ln -fs $(dirname ${my_dir})/templates/phpsysinfo.ini ${HOME}/php
|
|||||||
sudo -u ${USER} ln -fs $(dirname ${my_dir})/templates/green_bootstrap.css ${HOME}/phpsysinfo/templates/
|
sudo -u ${USER} ln -fs $(dirname ${my_dir})/templates/green_bootstrap.css ${HOME}/phpsysinfo/templates/
|
||||||
sudo -u ${USER} ln -fs $(dirname ${my_dir})/templates/index_bootstrap.html ${HOME}/phpsysinfo/templates/html
|
sudo -u ${USER} ln -fs $(dirname ${my_dir})/templates/index_bootstrap.html ${HOME}/phpsysinfo/templates/html
|
||||||
sudo chmod -R g+rw $(dirname ${my_dir})
|
sudo chmod -R g+rw $(dirname ${my_dir})
|
||||||
sudo chmod -R g+rw ${RECS_DIR}
|
sudo chmod -R g+rw ${EXTRACTED}
|
||||||
|
|
||||||
echo "Dropping and re-creating database"
|
echo "Dropping and re-creating database"
|
||||||
sudo /home/pi/BirdNET-Pi/scripts/createdb.sh
|
createdb.sh
|
||||||
echo "Restarting services"
|
echo "Restarting services"
|
||||||
sudo systemctl start birdnet_server.service
|
sudo systemctl start birdnet_server.service
|
||||||
sudo systemctl start birdnet_analysis.service
|
sudo systemctl start birdnet_analysis.service
|
||||||
|
|||||||
+1
-7
@@ -1,11 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# This script performs the mysql_secure_installation
|
set -x
|
||||||
# Creates the birds database
|
|
||||||
# Creates the detections table
|
|
||||||
# Creates the birder user and grants them appropriate
|
|
||||||
# permissions
|
|
||||||
# If using this script to re-initialize (DROP then CREATE)
|
|
||||||
# the DB, be sure to run this as root or with sudo
|
|
||||||
source /etc/birdnet/birdnet.conf
|
source /etc/birdnet/birdnet.conf
|
||||||
sqlite3 /home/pi/BirdNET-Pi/scripts/birds.db << EOF
|
sqlite3 /home/pi/BirdNET-Pi/scripts/birds.db << EOF
|
||||||
DROP TABLE IF EXISTS detections;
|
DROP TABLE IF EXISTS detections;
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
<button type="submit" name="submit" value="sudo shutdown now" onclick="return confirm('Are you sure you want to shutdown?')">Shutdown</button>
|
<button type="submit" name="submit" value="sudo shutdown now" onclick="return confirm('Are you sure you want to shutdown?')">Shutdown</button>
|
||||||
</form>
|
</form>
|
||||||
<form action="" method="POST">
|
<form action="" method="POST">
|
||||||
<button type="submit" name="submit" value="clear_all_data.sh" onclick="return confirm('Clear ALL Data? This cannot be undone.')">Clear ALL data</button>
|
<button type="submit" name="submit" value="sudo -upi clear_all_data.sh" onclick="return confirm('Clear ALL Data? This cannot be undone.')">Clear ALL data</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user