silence curl
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Alex 2022-09-12 15:28:44 -04:00
parent 9790cddf49
commit 6fe1b25bd5
Signed by: technically
GPG Key ID: 46E0A080F69E83F1
2 changed files with 11 additions and 11 deletions

View File

@ -26,10 +26,10 @@ else
chown -R gonk:gonk /var/spool/asterisk
echo " Pulling config files for the first time..."
curl -o /etc/asterisk/asterisk.conf https://ap5.gonknet.org/asterisk/$HOSTNAME/$GONK_KEY
curl -o /etc/asterisk/pjsip.conf https://ap5.gonknet.org/pjsip/$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 -so /etc/asterisk/asterisk.conf https://ap5.gonknet.org/asterisk/$HOSTNAME/$GONK_KEY
curl -so /etc/asterisk/pjsip.conf https://ap5.gonknet.org/pjsip/$HOSTNAME/$GONK_KEY
curl -so /etc/asterisk/modules.conf https://ap5.gonknet.org/modules/$HOSTNAME/$GONK_KEY
curl -so /etc/asterisk/logger.conf https://ap5.gonknet.org/logger/$HOSTNAME/$GONK_KEY
sed "s/##EXTERNAL_IP##/$(curl https://ipv4.myip.wtf/text)/g" /etc/asterisk/pjsip.conf
@ -40,15 +40,15 @@ else
echo " Setting up VOIPBL..."
echo " Downloading script..."
curl -o /usr/bin/voipbl.sh https://gonknet.org/static/voipbl.sh
curl -so /usr/bin/voipbl.sh https://gonknet.org/static/voipbl.sh
chmod 700 /usr/bin/voipbl.sh
chmod +x /usr/bin/voipbl.sh
echo " Setting up cron..."
echo "13 */4 * * * /usr/bin/voipbl.sh" >> /etc/cron.d/voipbl
echo " Setting up fail2ban"
curl -o /etc/fail2ban/jail.d/asterisk.conf https://ap5.gonknet.org/f2b/asterisk/$HOSTNAME/$GONK_KEY
curl -o /etc/fail2ban/action.d/voipbl.conf https://ap5.gonknet.org/f2b/voipbl/$HOSTNAME/$GONK_KEY
curl -so /etc/fail2ban/jail.d/asterisk.conf https://ap5.gonknet.org/f2b/asterisk/$HOSTNAME/$GONK_KEY
curl -so /etc/fail2ban/action.d/voipbl.conf https://ap5.gonknet.org/f2b/voipbl/$HOSTNAME/$GONK_KEY
rm /etc/fail2ban/jail.d/defaults-debian.conf
asterisk -U gonk -G gonk

View File

@ -1,10 +1,10 @@
#! /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
curl -so /etc/asterisk/asterisk.conf https://ap5.gonknet.org/asterisk/$HOSTNAME/$GONK_KEY
curl -so /etc/asterisk/pjsip.conf https://ap5.gonknet.org/pjsip/$HOSTNAME/$GONK_KEY
curl -so /etc/asterisk/modules.conf https://ap5.gonknet.org/modules/$HOSTNAME/$GONK_KEY
curl -so /etc/asterisk/logger.conf https://ap5.gonknet.org/logger/$HOSTNAME/$GONK_KEY
sed "s/##EXTERNAL_IP##/$(curl https://ipv4.myip.wtf/text)/g" /etc/asterisk/pjsip.conf