12 lines
534 B
Bash
12 lines
534 B
Bash
#! /bin/bash
|
|
|
|
echo "Reloading config files..."
|
|
curl -s https://ap5.gonknet.org/asterisk/$HOSTNAME/$GONK_KEY > /etc/asterisk/asterisk.conf
|
|
curl -s https://ap5.gonknet.org/pjsip/$HOSTNAME/$GONK_KEY > /etc/asterisk/pjsip.conf
|
|
curl -s https://ap5.gonknet.org/modules/$HOSTNAME/$GONK_KEY > /etc/asterisk/modules.conf
|
|
curl -s https://ap5.gonknet.org/logger/$HOSTNAME/$GONK_KEY > /etc/asterisk/logger.conf
|
|
|
|
sed -i "s/##EXTERNAL_IP##/$(curl https://ipv4.myip.wtf/text)/g" /etc/asterisk/pjsip.conf
|
|
|
|
|
|
asterisk -x "core restart when convenient" |