summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-11-10 20:21:22 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2015-11-14 09:27:35 +0100
commita114476e8134f27d2dd33b1f023535e3cc8bd094 (patch)
tree3ee04b3f10e56ea805c644ae466dec3e6822fa3e
parent0c599b39b0cead26550cea73194e950718a03d4a (diff)
downloadaurweb-a114476e8134f27d2dd33b1f023535e3cc8bd094.tar.xz
Make the notification script configurable
Add a configuration option to set the path of the notification script. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--conf/config.proto1
-rw-r--r--web/lib/acctfuncs.inc.php2
2 files changed, 2 insertions, 1 deletions
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);
}