adding new homepage for testing :)

- replaced all SERVICES arrays with commands
- altered {install,update}_services.sh to install new homepage
- renamed old index.html to mobile.html for mobile redirect
This commit is contained in:
Patrick McGuire
2021-10-20 18:47:00 -04:00
parent 8ad586791b
commit 73417ee3af
14 changed files with 210 additions and 139 deletions
+3 -14
View File
@@ -3,25 +3,14 @@
# set -x # Uncomment to debug
source /etc/birdnet/birdnet.conf &> /dev/null
LOG_DIR="${HOME}/BirdNET-Pi/logs"
SERVICES=(avahi-alias@.service
birdnet_analysis.service
birdnet_log.service
birdnet_recording.service
birdstats.service
birdterminal.service
caddy.service
extraction_log.service
extraction.service
extraction.timer
icecast2.service
livestream.service
${SYSTEMD_MOUNT})
services=$(awk '/service/ && /systemctl/ && !/php/ {print $3}' ${my_dir}/install_services.sh | sort)
# Create logs directory
[ -d ${LOG_DIR} ] || mkdir ${LOG_DIR}
# Create services logs
for i in "${SERVICES[@]}";do
for i in "${services[@]}";do
if [ -L /etc/systemd/system/multi-user.target.wants/${i} ];then
journalctl -u ${i} -n 100 --no-pager > ${LOG_DIR}/${i}.log
cp -L /etc/systemd/system/multi-user.target.wants/${i} ${LOG_DIR}/${i}