diff --git a/storage-server-backup-sh/check_extern.fish b/archived/check_extern.fish similarity index 100% rename from storage-server-backup-sh/check_extern.fish rename to archived/check_extern.fish diff --git a/rpi-scripts/HOWTO b/rpi-scripts/HOWTO new file mode 100644 index 0000000000000000000000000000000000000000..6a9b286ceacfa0d126d660b1dfccc9a3485c8948 --- /dev/null +++ b/rpi-scripts/HOWTO @@ -0,0 +1,2 @@ +1. copy keep_unlocked.py to app/ +2. apply keep-awake.patch to app/main.py diff --git a/rpi-scripts/keep-awake.patch b/rpi-scripts/keep-awake.patch new file mode 100644 index 0000000000000000000000000000000000000000..c2025d3d3add73a1e5806c10d8269f36c2068077 --- /dev/null +++ b/rpi-scripts/keep-awake.patch @@ -0,0 +1,22 @@ +diff --git a/app/main.py b/app/main.py +index 6cab2c0..4048607 100755 +--- a/app/main.py ++++ b/app/main.py +@@ -19,6 +19,8 @@ import socket_api + import views + from find_files import find as find_files + ++import keep_unlocked ++ + host = os.environ.get('HOST', '127.0.0.1') + port = int(os.environ.get('PORT', 48000)) + debug = 'DEBUG' in os.environ +@@ -79,6 +81,8 @@ def handle_error(e): + + + def main(): ++ with app.app_context(): ++ keep_unlocked.start_keep_awake_thread(flask.current_app.config.get('KEYBOARD_PATH')) + socketio = socket_api.socketio + socketio.init_app(app) + socketio.run(app, diff --git a/storage-server-backup-sh/daily.fish b/storage-server-backup-sh/daily.fish index 979776855ffb943e6e84a55bddfcf96154402d1b..6d737c9f565351f25a3bd4816d1caa7776aeec02 100755 --- a/storage-server-backup-sh/daily.fish +++ b/storage-server-backup-sh/daily.fish @@ -39,11 +39,7 @@ else end # Check if extern target needs packing - # TODO: remove this fallback after upgrade client side do.bash - if test -f /storage/backups/extern/NEED_PACKING - rm -f /storage/backups/extern/NEED_PACKING - reach_target target_extern_lwl - else if test -f /storage/cache/target_extern_lwl/NEED_PACKING + if test -f /storage/cache/target_extern_lwl/NEED_PACKING rm -f /storage/cache/target_extern_lwl/NEED_PACKING reach_target target_extern_lwl end @@ -59,5 +55,3 @@ end test (df -T | grep /dev/ploop | tr -s ' ' | cut -d ' ' -f 3,5 | sed 's/^.* //g') -lt 104857600 and email_notify "Backup system has low disk space. "(df -Th | grep /dev/ploop) -fish check_extern.fish - diff --git a/storage-server-backup-sh/targets.fish b/storage-server-backup-sh/targets.fish index 23181f46e270380f6747b2a188347c0e49fc5a75..7c40d8f88a6f19abdf7bdc5a367af9eb6ed06872 100644 --- a/storage-server-backup-sh/targets.fish +++ b/storage-server-backup-sh/targets.fish @@ -89,12 +89,7 @@ function target_mail_www_recolic_net_data end function target_extern_lwl - # Temporary: Remove this fallback after upgrading client side do.bash. - if test -d /storage/cache/target_extern_lwl - pack_backup_dir /storage/cache/target_extern_lwl - else - pack_backup_dir /storage/backups/extern - end + pack_backup_dir /storage/cache/target_extern_lwl end