PLNK/resources/reload.sh
Alex 0256aa9c49
Some checks reported errors
continuous-integration/drone/push Build was killed
add -i to sed instead of redirection fixing blank pjsip.conf
2022-09-12 19:56:23 -04:00

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"