#! /bin/sh
# /home/scripts_python_MAX98357/M915_play_remote_link_do_it.sh
# /home/scripts_python_MAX98357/M915_play_remote_link_do_it.sh /home/scripts_python_MAX98357/test_ok.mp3
# /home/scripts_python_MAX98357/M915_play_remote_link_do_it.sh http://aqcm05.ddns.net:31580/v2/audio/belier.mp3

sudo pkill mpg123
sudo pkill aplay

sudo systemctl stop SPL.service
sudo raspi-gpio set 16 op dl

cd /home/audio/
sudo wget $1 -O AQCM05.mp3
sudo mpg123 AQCM05.mp3

sudo raspi-gpio set 16 op dh
sudo systemctl restart SPL.service
