amazon_invoice_downloader/scripts/start-novnc-configure.sh

21 lines
803 B
Bash

#!/usr/bin/env bash
set -euo pipefail
DISPLAY_NUM=${DISPLAY_NUM:-:99}
VNC_PORT=${VNC_PORT:-5900}
NOVNC_PORT=${NOVNC_PORT:-6080}
MARKETPLACE=${MARKETPLACE:-de}
DOWNLOAD_DIR=${DOWNLOAD_DIR:-/downloads}
LOGIN_WAIT_SECONDS=${LOGIN_WAIT_SECONDS:-300}
export DISPLAY="$DISPLAY_NUM"
Xvfb "$DISPLAY_NUM" -screen 0 1920x1080x24 &
fluxbox -display "$DISPLAY_NUM" &
x11vnc -display "$DISPLAY_NUM" -forever -shared -rfbport "$VNC_PORT" -nopw &
websockify --web=/usr/share/novnc/ "$NOVNC_PORT" "localhost:$VNC_PORT" &
echo "noVNC bereit unter: http://<SERVER-IP>:$NOVNC_PORT/vnc.html"
echo "Melde dich bei Amazon an. Session wird nach $LOGIN_WAIT_SECONDS Sekunden gespeichert."
python /app/main.py configure --marketplace "$MARKETPLACE" --download-dir "$DOWNLOAD_DIR" --login-wait-seconds "$LOGIN_WAIT_SECONDS"