Add a configuration option to set the path of the notification script.

Signed-off-by: Lukas Fleischer <[email protected]>
---
 conf/config.proto         | 1 +
 web/lib/acctfuncs.inc.php | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/conf/config.proto b/conf/config.proto
index de9acdf..2390dfa 100644
--- a/conf/config.proto
+++ b/conf/config.proto
@@ -32,6 +32,7 @@ enable-maintenance = 1
 maintenance-exceptions = 127.0.0.1
 
 [notifications]
+notify-cmd = /srv/http/aurweb/scripts/notify.py
 sendmail = /usr/bin/sendmail
 sender = [email protected]
 reply-to = [email protected]
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index a200998..a166d65 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -1282,7 +1282,7 @@ function account_set_ssh_keys($uid, $ssh_keys, 
$ssh_fingerprints) {
  * @return void
  */
 function notify($params, $text='') {
-       $cmd = realpath('../../scripts/notify.py');
+       $cmd = config_get('notifications', 'notify-cmd');
        foreach ($params as $param) {
                $cmd .= ' ' . escapeshellarg($param);
        }
-- 
2.6.2

Reply via email to