added reload.sh, optimized dockerfile,
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
31f5854686
commit
d01311c62a
@ -50,6 +50,8 @@ RUN make install
|
||||
|
||||
## Cleanup
|
||||
WORKDIR /
|
||||
RUN cp /build/reload.sh /usr/bin/reload
|
||||
RUN chmod +x /usr/bin/reload
|
||||
RUN cp /build/gonk.sh /usr/bin/gonk
|
||||
RUN chmod +x /usr/bin/gonk
|
||||
RUN rm -rf /build
|
||||
|
@ -31,6 +31,9 @@ else
|
||||
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
|
||||
|
||||
echo " Setting up auto reload config files..."
|
||||
echo "26 * * * * /usr/bin/reload" >> /etc/cron.d/reload
|
||||
|
||||
|
||||
echo " Setting up VOIPBL..."
|
||||
echo " Downloading script..."
|
||||
@ -48,7 +51,7 @@ else
|
||||
asterisk -U gonk -G gonk
|
||||
|
||||
sleep 2
|
||||
|
||||
|
||||
kill -9 -- $(cat /var/run/asterisk/asterisk.pid)
|
||||
|
||||
service fail2ban start
|
||||
|
9
resources/reload.sh
Normal file
9
resources/reload.sh
Normal 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"
|
Loading…
Reference in New Issue
Block a user