diff --git a/modules/clan/phonebox/default.nix b/modules/clan/phonebox/default.nix index ff27bb7..7cc3dc0 100644 --- a/modules/clan/phonebox/default.nix +++ b/modules/clan/phonebox/default.nix @@ -325,13 +325,15 @@ requires = [ "asterisk.service" ]; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.inotify-tools ]; + path = with pkgs; [ inotify-tools asterisk ]; script = '' - while inotifywait -m -e create /etc/static/asterisk; do + inotifywait -m -e move /etc/asterisk | + while read path action file; do case "$file" in pjsip.conf) - asterisk -rx "pjsip reload" - ;; + echo "restarting pjsip" + asterisk -rx "pjsip reload" + ;; esac done '';