mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
Merge d1666413aa into cb9a5d6d69
This commit is contained in:
commit
9cde7d667d
1 changed files with 12 additions and 4 deletions
|
|
@ -467,10 +467,6 @@ class Nextcloud extends Base implements IBackupProvider
|
|||
$keep_days = $nextcloud->numdays->getValue();
|
||||
$keep_num = $nextcloud->numbackups->getValue();
|
||||
|
||||
if ($nextcloud->addhostname->isEqual('1')) {
|
||||
$backupdir .= "/" . gethostname();
|
||||
}
|
||||
|
||||
// Check if destination directory exists, create (full path) if not
|
||||
try {
|
||||
$internal_username = $this->getInternalUsername($url, $username, $password);
|
||||
|
|
@ -479,6 +475,18 @@ class Nextcloud extends Base implements IBackupProvider
|
|||
return array();
|
||||
}
|
||||
|
||||
if ($nextcloud->addhostname->isEqual('1')) {
|
||||
$backupdir .= "/" . gethostname();
|
||||
# Since we have a new backupdir, create this too, if needed
|
||||
try {
|
||||
$this->create_directory($url, $username, $password, $internal_username, $backupdir);
|
||||
} catch (\Exception $e) {
|
||||
syslog(LOG_ERR, "nextcloud backup failed: " . $e);
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($strategy) {
|
||||
$list_of_files = $this->backupstrat_one($internal_username, $username, $password, $url, $backupdir, $crypto_password);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue