v1.5.1: Sauvegarde/restauration intégrale AstDB et synchronisation SIP immédiate des téléphones (check-sync)
This commit is contained in:
1 parent
accec47d08
commit
65a62ca0e4
6 files changed
+89
-5
No files matched your search
@@ -174,6 +174,21 @@ class SystemChecker
|
||||
}
|
||||
}
|
||||
|
||||
$notifyConf = '/etc/asterisk/pjsip_notify.conf';
|
||||
if (is_file($notifyConf) && is_writable($notifyConf)) {
|
||||
$content = (string)file_get_contents($notifyConf);
|
||||
if (!str_contains($content, 'pjsip_notify.custom.conf')) {
|
||||
file_put_contents($notifyConf, rtrim($content) . "\n\n#tryinclude \"pjsip_notify.custom.conf\"\n");
|
||||
}
|
||||
}
|
||||
$customNotify = '/etc/asterisk/pjsip_notify.custom.conf';
|
||||
if (!file_exists($customNotify)) {
|
||||
@file_put_contents($customNotify, "[check-sync]\nEvent=>check-sync\\;reboot=false\n\n[resync]\nEvent=>check-sync\\;reboot=false\n");
|
||||
@chown($customNotify, 'asterisk');
|
||||
@chgrp($customNotify, 'asterisk');
|
||||
@chmod($customNotify, 0664);
|
||||
}
|
||||
|
||||
$extConf = '/etc/asterisk/extensions.conf';
|
||||
if (is_file($extConf) && is_writable($extConf)) {
|
||||
$content = (string)file_get_contents($extConf);
|
||||
|
||||
Reference in new issue
Block a user