allow setting notify credentials in environment

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-06-07 15:33:58 +02:00
parent af2ecbbd5a
commit 642bdb5bb5
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 8 additions and 0 deletions

View File

@ -106,9 +106,17 @@ class Notify extends Base {
if ($input->getOption('user')) {
$mount->setBackendOption('user', $input->getOption('user'));
} else if (isset($_ENV['NOTIFY_USER'])) {
$mount->setBackendOption('user', $_ENV['NOTIFY_USER']);
} else if (isset($_SERVER['NOTIFY_USER'])) {
$mount->setBackendOption('user', $_SERVER['NOTIFY_USER']);
}
if ($input->getOption('password')) {
$mount->setBackendOption('password', $input->getOption('password'));
} else if (isset($_ENV['NOTIFY_PASSWORD'])) {
$mount->setBackendOption('password', $_ENV['NOTIFY_PASSWORD']);
} else if (isset($_SERVER['NOTIFY_PASSWORD'])) {
$mount->setBackendOption('password', $_SERVER['NOTIFY_PASSWORD']);
}
try {