[aur-dev] [PATCH] Make the notification script configurable
Lukas Fleischer
lfleischer at archlinux.org
Sat Nov 14 08:29:42 UTC 2015
Add a configuration option to set the path of the notification script.
Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
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 at aur.archlinux.org
reply-to = noreply at 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);
}
--
2.6.2
More information about the aur-dev
mailing list