added reload.sh, optimized dockerfile,
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Alex 2022-09-12 13:41:03 -04:00
parent 31f5854686
commit d01311c62a
Signed by: technically
GPG Key ID: 46E0A080F69E83F1
3 changed files with 15 additions and 1 deletions

View File

@ -50,6 +50,8 @@ RUN make install
## Cleanup ## Cleanup
WORKDIR / WORKDIR /
RUN cp /build/reload.sh /usr/bin/reload
RUN chmod +x /usr/bin/reload
RUN cp /build/gonk.sh /usr/bin/gonk RUN cp /build/gonk.sh /usr/bin/gonk
RUN chmod +x /usr/bin/gonk RUN chmod +x /usr/bin/gonk
RUN rm -rf /build RUN rm -rf /build

View File

@ -31,6 +31,9 @@ else
curl -o /etc/asterisk/modules.conf https://ap5.gonknet.org/modules/$HOSTNAME/$GONK_KEY curl -o /etc/asterisk/modules.conf https://ap5.gonknet.org/modules/$HOSTNAME/$GONK_KEY
curl -o /etc/asterisk/logger.conf https://ap5.gonknet.org/logger/$HOSTNAME/$GONK_KEY curl -o /etc/asterisk/logger.conf https://ap5.gonknet.org/logger/$HOSTNAME/$GONK_KEY
echo " Setting up auto reload config files..."
echo "26 * * * * /usr/bin/reload" >> /etc/cron.d/reload
echo " Setting up VOIPBL..." echo " Setting up VOIPBL..."
echo " Downloading script..." echo " Downloading script..."

9
resources/reload.sh Normal file
View File

@ -0,0 +1,9 @@
#! /bin/bash
echo "Reloading config files..."
curl -qo /etc/asterisk/asterisk.conf https://ap5.gonknet.org/asterisk/$HOSTNAME/$GONK_KEY
curl -qo /etc/asterisk/pjsip.conf https://ap5.gonknet.org/pjsip/$HOSTNAME/$GONK_KEY
curl -qo /etc/asterisk/modules.conf https://ap5.gonknet.org/modules/$HOSTNAME/$GONK_KEY
curl -qo /etc/asterisk/logger.conf https://ap5.gonknet.org/logger/$HOSTNAME/$GONK_KEY
asterisk -x "core restart when convenient"