Add comprehensive inline metadata documentation to all BackTunnel scripts

This commit is contained in:
2025-09-21 09:45:43 +02:00
parent 17cdbe9c55
commit 0e82955af5
11 changed files with 466 additions and 20 deletions

View File

@@ -1,6 +1,36 @@
#!/usr/bin/env bash
# Copyright (c) 2025. LUXIM d.o.o., Slovenia - Matjaž Mozetič.
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2025 LUXIM d.o.o., Slovenia
# Author: Matjaž Mozetič
#
# Name: backtunnel-access-gui
# Summary: KDE/GUI wrapper to mount a BackTunnel share with dialogs and logging.
# Description:
# GUI front-end that prompts for remote, tunnel port, and mount point using kdialog,
# then launches backtunnel-access in a terminal (Konsole/xterm) to perform the mount.
# Prefills fields from BackTunnel profiles.ini when available (read-only, best-effort).
# All output is logged to /tmp/backtunnel-access-gui.<uid>.log for troubleshooting.
#
# Usage:
# backtunnel-access-gui <selected-folder>
#
# Examples:
# backtunnel-access-gui ~/Downloads
#
# Dependencies:
# - bash
# - kdialog (for GUI prompts)
# - konsole or xterm (preferred terminals; falls back to background run if missing)
# - awk (for simple INI parsing), tee
# - backtunnel-access (invoked to perform the actual mount)
#
# Exit codes:
# 0 command launched (terminal or background)
# 1 invalid usage or no folder selected
#
# Notes:
# - Profiles are used only to prefill fields (access side does not support @profile directly).
# - If no terminal emulator is available, runs in background and shows a message with the log path.
set -euo pipefail