mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Fix indentation and formatting issues in bunkerweb-scheduler.sh and entrypoint.sh
This commit is contained in:
parent
159c9475f3
commit
788c2c56bc
2 changed files with 14 additions and 14 deletions
|
|
@ -109,15 +109,15 @@ with db.sql_engine.connect() as conn:
|
|||
result = conn.execute(sa.text('SELECT version FROM bw_metadata WHERE id = 1'))
|
||||
print(next(result)[0])
|
||||
except BaseException as e:
|
||||
if 'doesn\'t exist' not in str(e) and 'no such table' not in str(e) and 'relation \"bw_metadata\" does not exist' not in str(e):
|
||||
if "doesn't exist" not in str(e) and "no such table" not in str(e) and 'relation "bw_metadata" does not exist' not in str(e):
|
||||
with open('/var/tmp/bunkerweb/database_error', 'w') as file:
|
||||
file.write(str(e))
|
||||
file.write(str(e))
|
||||
print('none')
|
||||
else:
|
||||
print('${installed_version}')
|
||||
|
||||
with open('/var/tmp/bunkerweb/database_uri', 'w') as file:
|
||||
file.write(db.database_uri)
|
||||
file.write(db.database_uri)
|
||||
EOL
|
||||
|
||||
current_version=$(sudo -E -u nginx -g nginx /bin/bash -c "PYTHONPATH=$PYTHONPATH python3 /tmp/version_check.py")
|
||||
|
|
|
|||
|
|
@ -72,19 +72,19 @@ LOGGER = setup_logger('Scheduler', getenv('CUSTOM_LOG_LEVEL', getenv('LOG_LEVEL'
|
|||
|
||||
db = Database(LOGGER)
|
||||
with db.sql_engine.connect() as conn:
|
||||
try:
|
||||
result = conn.execute(sa.text('SELECT version FROM bw_metadata WHERE id = 1'))
|
||||
print(next(result)[0])
|
||||
except BaseException as e:
|
||||
if 'doesn\'t exist' not in str(e) and 'no such table' not in str(e) and 'relation \"bw_metadata\" does not exist' not in str(e):
|
||||
with open('/var/tmp/bunkerweb/database_error', 'w') as file:
|
||||
file.write(str(e))
|
||||
print('none')
|
||||
else:
|
||||
print('${installed_version}')
|
||||
try:
|
||||
result = conn.execute(sa.text('SELECT version FROM bw_metadata WHERE id = 1'))
|
||||
print(next(result)[0])
|
||||
except BaseException as e:
|
||||
if \"doesn't exist\" not in str(e) and \"no such table\" not in str(e) and 'relation \"bw_metadata\" does not exist' not in str(e):
|
||||
with open('/var/tmp/bunkerweb/database_error', 'w') as file:
|
||||
file.write(str(e))
|
||||
print('none')
|
||||
else:
|
||||
print('${installed_version}')
|
||||
|
||||
with open('/var/tmp/bunkerweb/database_uri', 'w') as file:
|
||||
file.write(db.database_uri)
|
||||
file.write(db.database_uri)
|
||||
")
|
||||
|
||||
if [ "$current_version" == "none" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue