Add reMarkable backup system with web UI
- Docker container with rmapi cloud backup, PDF conversion pipeline - Web UI: file browser, multi-select, delete/move, thumbnail preview - Sync: backup from reMarkable cloud, rmdoc→PDF conversion via rmc+Inkscape - Excluded-files mechanism to prevent deleted items from returning after sync Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
32
remarkable/entrypoint.sh
Executable file
32
remarkable/entrypoint.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_DIR="${BASE_DIR:-/data}"
|
||||
BACKUP_CRON="${BACKUP_CRON:-15 3 * * *}"
|
||||
SNAPSHOT_KEEP="${SNAPSHOT_KEEP:-60}"
|
||||
RUN_ON_START="${RUN_ON_START:-0}"
|
||||
|
||||
mkdir -p "${BASE_DIR}" /var/log
|
||||
|
||||
# Cron-Job einrichten
|
||||
CRON_CMD="SNAPSHOT_KEEP=${SNAPSHOT_KEEP} remarkable-backup.sh ${BASE_DIR} / && remarkable-convert.sh ${BASE_DIR}/current >> /var/log/rm-backup.log 2>&1"
|
||||
echo "${BACKUP_CRON} root ${CRON_CMD}" > /etc/cron.d/remarkable
|
||||
chmod 0644 /etc/cron.d/remarkable
|
||||
|
||||
echo "== reMarkable Container =="
|
||||
echo "Cron: ${BACKUP_CRON}"
|
||||
echo "Base: ${BASE_DIR}"
|
||||
echo "Retention: ${SNAPSHOT_KEEP}"
|
||||
|
||||
if [[ "${RUN_ON_START}" == "1" ]]; then
|
||||
echo "Starte initiales Backup ..."
|
||||
SNAPSHOT_KEEP="${SNAPSHOT_KEEP}" remarkable-backup.sh "${BASE_DIR}" / || true
|
||||
remarkable-convert.sh "${BASE_DIR}/current" || true
|
||||
fi
|
||||
|
||||
# Cron starten
|
||||
service cron start
|
||||
|
||||
# PHP Web-Server im Vordergrund
|
||||
echo "Web-UI: http://0.0.0.0:8080"
|
||||
exec php -S 0.0.0.0:8080 -t /app
|
||||
Reference in New Issue
Block a user