From a114476e8134f27d2dd33b1f023535e3cc8bd094 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 10 Nov 2015 20:21:22 +0100 Subject: Make the notification script configurable Add a configuration option to set the path of the notification script. Signed-off-by: Lukas Fleischer --- 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 = notify@aur.archlinux.org reply-to = noreply@aur.archlinux.org 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); } -- cgit v1.2.3-70-g09d2