mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Don't delete the ejabberd backup database if it fails to load.
This commit is contained in:
parent
5bee775bc8
commit
b98a9ad84d
10
actions/xmpp
10
actions/xmpp
@ -168,9 +168,13 @@ def subcommand_change_hostname(arguments):
|
|||||||
|
|
||||||
# load backup database
|
# load backup database
|
||||||
if os.path.exists(EJABBERD_BACKUP):
|
if os.path.exists(EJABBERD_BACKUP):
|
||||||
time.sleep(10)
|
try:
|
||||||
subprocess.call(['ejabberdctl', 'load', EJABBERD_BACKUP])
|
subprocess.check_output(['ejabberdctl',
|
||||||
os.remove(EJABBERD_BACKUP)
|
'load',
|
||||||
|
EJABBERD_BACKUP])
|
||||||
|
os.remove(EJABBERD_BACKUP)
|
||||||
|
except subprocess.CalledProcessError as err:
|
||||||
|
print('Failed to load ejabberd backup database: %s', err)
|
||||||
else:
|
else:
|
||||||
print('Could not load ejabberd backup database: %s not found'
|
print('Could not load ejabberd backup database: %s not found'
|
||||||
% EJABBERD_BACKUP)
|
% EJABBERD_BACKUP)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user