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>
This commit is contained in:
Lukas Fleischer 2015-11-10 20:21:22 +01:00
parent 0c599b39b0
commit a114476e81
2 changed files with 2 additions and 1 deletions

View file

@ -32,6 +32,7 @@ enable-maintenance = 1
maintenance-exceptions = 127.0.0.1 maintenance-exceptions = 127.0.0.1
[notifications] [notifications]
notify-cmd = /srv/http/aurweb/scripts/notify.py
sendmail = /usr/bin/sendmail sendmail = /usr/bin/sendmail
sender = notify@aur.archlinux.org sender = notify@aur.archlinux.org
reply-to = noreply@aur.archlinux.org reply-to = noreply@aur.archlinux.org

View file

@ -1282,7 +1282,7 @@ function account_set_ssh_keys($uid, $ssh_keys, $ssh_fingerprints) {
* @return void * @return void
*/ */
function notify($params, $text='') { function notify($params, $text='') {
$cmd = realpath('../../scripts/notify.py'); $cmd = config_get('notifications', 'notify-cmd');
foreach ($params as $param) { foreach ($params as $param) {
$cmd .= ' ' . escapeshellarg($param); $cmd .= ' ' . escapeshellarg($param);
} }