PLNK/resources/reload.sh
Alex 6fe1b25bd5
Some checks reported errors
continuous-integration/drone/push Build was killed
silence curl
2022-09-12 15:28:44 -04:00

12 lines
526 B
Bash

#! /bin/bash
echo "Reloading config files..."
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
asterisk -x "core restart when convenient"