- airsonic (restart script update)
- Jonathan Haack
- Haack’s Networking
- webmaster@haacksnetworking.org
//airsonic (restart script update)//
Have an AirSonic instance? If so, you need to reboot at times and/or it may crash. If so, here’s a simple script I run to monitor whether it is up or not, and start it if not and/or write a log entry (or exit) if it is!
#!/bin/shDATE=date +"%Y%m%d-%H:%M:%S"ifps -ef | grep "java -jar" > /home/sexa/Desktop/airsonic-tmp.logtail -n -2 /home/sexa/Desktop/airsonic-tmp.log | grep "java -jar -Dserver.port=8081 /var/airsonic/airsonic.war"thenecho "Arisonic was running at $DATE" >> /home/sexa/Desktop/airsonic-ok.logelseexport TERM='vt100'su - airsonic <<SHTscriptscreen -S airsonic bash -c "java -jar -Dserver.port=8081 /var/airsonic/airsonic.war; bash"SHTfi
Let’s GO! The AirSonic advanced github project. The Wiki I maintain on how I build my instance.
Haack’s Networking
10-15-22; 11:54pm