Add backtunnel-access-gui, enhance installation/removal logic, and refine backtunnel-share unmount instructions
This commit is contained in:
8
Makefile
8
Makefile
@@ -38,7 +38,7 @@ init:
|
|||||||
cp "$(BT_CFG_EXAMPLE)" "$(BT_CFG_FILE)"; \
|
cp "$(BT_CFG_EXAMPLE)" "$(BT_CFG_FILE)"; \
|
||||||
echo "Created $(BT_CFG_FILE) from $(BT_CFG_EXAMPLE)."; \
|
echo "Created $(BT_CFG_FILE) from $(BT_CFG_EXAMPLE)."; \
|
||||||
else \
|
else \
|
||||||
echo "Example file $(BT_CFG_EXAMPLE) not found."; exit 1; \
|
echo "Example file $(BT_CFG_EXAMPLE)" not found.; exit 1; \
|
||||||
fi \
|
fi \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -47,6 +47,7 @@ install:
|
|||||||
@install -Dm755 scripts/backtunnel-share "$(DESTDIR)$(BINDIR)/backtunnel-share"
|
@install -Dm755 scripts/backtunnel-share "$(DESTDIR)$(BINDIR)/backtunnel-share"
|
||||||
@install -Dm755 scripts/backtunnel-access "$(DESTDIR)$(BINDIR)/backtunnel-access"
|
@install -Dm755 scripts/backtunnel-access "$(DESTDIR)$(BINDIR)/backtunnel-access"
|
||||||
@install -Dm755 scripts/backtunnel-share-gui "$(DESTDIR)$(BINDIR)/backtunnel-share-gui"
|
@install -Dm755 scripts/backtunnel-share-gui "$(DESTDIR)$(BINDIR)/backtunnel-share-gui"
|
||||||
|
@install -Dm755 scripts/backtunnel-access-gui "$(DESTDIR)$(BINDIR)/backtunnel-access-gui"
|
||||||
@install -Dm644 man/backtunnel.1 "$(DESTDIR)$(MANDIR)/man1/backtunnel.1"
|
@install -Dm644 man/backtunnel.1 "$(DESTDIR)$(MANDIR)/man1/backtunnel.1"
|
||||||
@install -Dm644 completions/backtunnel.bash "$(DESTDIR)$(BCOMP)/backtunnel-share"
|
@install -Dm644 completions/backtunnel.bash "$(DESTDIR)$(BCOMP)/backtunnel-share"
|
||||||
@install -Dm644 completions/backtunnel.bash "$(DESTDIR)$(BCOMP)/backtunnel-access"
|
@install -Dm644 completions/backtunnel.bash "$(DESTDIR)$(BCOMP)/backtunnel-access"
|
||||||
@@ -64,7 +65,8 @@ install:
|
|||||||
uninstall:
|
uninstall:
|
||||||
@rm -f "$(DESTDIR)$(BINDIR)/backtunnel-share" \
|
@rm -f "$(DESTDIR)$(BINDIR)/backtunnel-share" \
|
||||||
"$(DESTDIR)$(BINDIR)/backtunnel-access" \
|
"$(DESTDIR)$(BINDIR)/backtunnel-access" \
|
||||||
"$(DESTDIR)$(BINDIR)/backtunnel-share-gui"
|
"$(DESTDIR)$(BINDIR)/backtunnel-share-gui" \
|
||||||
|
"$(DESTDIR)$(BINDIR)/backtunnel-access-gui"
|
||||||
@rm -f "$(DESTDIR)$(MANDIR)/man1/backtunnel.1"
|
@rm -f "$(DESTDIR)$(MANDIR)/man1/backtunnel.1"
|
||||||
@rm -f "$(DESTDIR)$(BCOMP)/backtunnel-share" \
|
@rm -f "$(DESTDIR)$(BCOMP)/backtunnel-share" \
|
||||||
"$(DESTDIR)$(BCOMP)/backtunnel-access"
|
"$(DESTDIR)$(BCOMP)/backtunnel-access"
|
||||||
@@ -92,6 +94,7 @@ check:
|
|||||||
@bash -n scripts/backtunnel-share
|
@bash -n scripts/backtunnel-share
|
||||||
@bash -n scripts/backtunnel-access
|
@bash -n scripts/backtunnel-access
|
||||||
@bash -n scripts/backtunnel-share-gui
|
@bash -n scripts/backtunnel-share-gui
|
||||||
|
@bash -n scripts/backtunnel-access-gui
|
||||||
@echo "bash -n OK."
|
@echo "bash -n OK."
|
||||||
|
|
||||||
shellcheck:
|
shellcheck:
|
||||||
@@ -99,3 +102,4 @@ shellcheck:
|
|||||||
@shellcheck scripts/backtunnel-share
|
@shellcheck scripts/backtunnel-share
|
||||||
@shellcheck scripts/backtunnel-access
|
@shellcheck scripts/backtunnel-access
|
||||||
@shellcheck scripts/backtunnel-share-gui
|
@shellcheck scripts/backtunnel-share-gui
|
||||||
|
@shellcheck scripts/backtunnel-access-gui
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2025. LUXIM d.o.o., Slovenia - Matjaž Mozetič.
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
LOG="/tmp/backtunnel-access-gui.$UID.log"
|
LOG="/tmp/backtunnel-access-gui.$UID.log"
|
||||||
@@ -219,7 +219,8 @@ if $INVITE; then
|
|||||||
# Paste this on the REMOTE host (or SSH there first, then paste):
|
# Paste this on the REMOTE host (or SSH there first, then paste):
|
||||||
${INVITE_CMD}
|
${INVITE_CMD}
|
||||||
# Unmount when done:
|
# Unmount when done:
|
||||||
fusermount -u '${INVITE_MOUNT}'
|
# (use the one available on your system)
|
||||||
|
fusermount -u '${INVITE_MOUNT}' || fusermount3 -u '${INVITE_MOUNT}'
|
||||||
EOT
|
EOT
|
||||||
)
|
)
|
||||||
echo "🔗 Invite (copy to chat):"
|
echo "🔗 Invite (copy to chat):"
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (c) 2025. LUXIM d.o.o., Slovenia - Matjaž Mozetič.
|
||||||
|
|
||||||
# GUI wrapper for BackTunnel "Share" action (Dolphin service menu)
|
# GUI wrapper for BackTunnel "Share" action (Dolphin service menu)
|
||||||
# Prompts for parameters via kdialog and launches backtunnel-share in a terminal.
|
# Prompts for parameters via kdialog and launches backtunnel-share in a terminal.
|
||||||
|
|
||||||
|
|||||||
@@ -4,52 +4,41 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Install binaries
|
PREFIX=${PREFIX:-/usr}
|
||||||
echo "📦 Installing BackTunnel binaries to /usr/local/bin..."
|
BINDIR="$PREFIX/bin"
|
||||||
sudo install -m 0755 scripts/backtunnel-share /usr/local/bin/backtunnel-share
|
MANDIR="$PREFIX/share/man/man1"
|
||||||
sudo install -m 0755 scripts/backtunnel-access /usr/local/bin/backtunnel-access
|
KIO_SM="$PREFIX/share/kio/servicemenus"
|
||||||
|
KSVC5="$PREFIX/share/kservices5/ServiceMenus"
|
||||||
|
APPDIR="$PREFIX/share/applications"
|
||||||
|
BCOMP="$PREFIX/share/bash-completion/completions"
|
||||||
|
|
||||||
# Man page
|
echo "Removing BackTunnel from $PREFIX ..."
|
||||||
echo "📚 Installing man page..."
|
|
||||||
sudo install -m 0644 man/backtunnel.1 /usr/local/share/man/man1/backtunnel.1 || true
|
|
||||||
sudo mandb || true
|
|
||||||
|
|
||||||
# Bash completions
|
rm -f "$BINDIR/backtunnel-share" \
|
||||||
if [[ -d /usr/share/bash-completion/completions ]]; then
|
"$BINDIR/backtunnel-access" \
|
||||||
echo "🧠 Installing bash completion ..."
|
"$BINDIR/backtunnel-share-gui" \
|
||||||
sudo install -m 0644 completions/backtunnel.bash /usr/share/bash-completion/completions/backtunnel-share || true
|
"$BINDIR/backtunnel-access-gui"
|
||||||
sudo install -m 0644 completions/backtunnel.bash /usr/share/bash-completion/completions/backtunnel-access || true
|
|
||||||
elif [[ -d /etc/bash_completion.d ]]; then
|
|
||||||
echo "🧠 Installing bash completion ..."
|
|
||||||
sudo install -m 0644 completions/backtunnel.bash /etc/bash_completion.d/backtunnel || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dolphin service menus (Plasma 6)
|
rm -f "$MANDIR/backtunnel.1"
|
||||||
if [[ -d /usr/share/kio/servicemenus ]]; then
|
|
||||||
echo "🖱️ Installing Dolphin service menus (Plasma 6)..."
|
|
||||||
sudo install -m 0644 servicemenus/backtunnel_share.desktop /usr/share/kio/servicemenus/backtunnel_share.desktop || true
|
|
||||||
sudo install -m 0644 servicemenus/backtunnel_access.desktop /usr/share/kio/servicemenus/backtunnel_access.desktop || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dolphin service menus (Plasma 5)
|
rm -f "$BCOMP/backtunnel-share" \
|
||||||
if [[ -d /usr/share/kservices5/ServiceMenus ]]; then
|
"$BCOMP/backtunnel-access"
|
||||||
echo "🖱️ Installing Dolphin service menus (Plasma 5)..."
|
|
||||||
sudo install -m 0644 servicemenus/backtunnel_share.desktop /usr/share/kservices5/ServiceMenus/backtunnel_share.desktop || true
|
|
||||||
sudo install -m 0644 servicemenus/backtunnel_access.desktop /usr/share/kservices5/ServiceMenus/backtunnel_access.desktop || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Desktop launcher (optional)
|
rm -f "$KIO_SM/backtunnel_share.desktop" \
|
||||||
if [[ -d /usr/share/applications ]]; then
|
"$KIO_SM/backtunnel_access.desktop" \
|
||||||
echo "🖥️ Installing desktop launcher ..."
|
"$KSVC5/backtunnel_share.desktop" \
|
||||||
sudo install -m 0644 desktop/backtunnel.desktop /usr/share/applications/backtunnel.desktop || true
|
"$KSVC5/backtunnel_access.desktop"
|
||||||
fi
|
|
||||||
|
|
||||||
# Refresh desktop DB and KDE service cache (best-effort)
|
rm -f "$APPDIR/backtunnel.desktop" || true
|
||||||
command -v update-desktop-database >/dev/null 2>&1 && sudo update-desktop-database -q || true
|
|
||||||
|
# Do not remove /usr/share/backtunnel/profiles.ini (packaged example) — leave it.
|
||||||
|
|
||||||
|
# Refresh caches
|
||||||
|
command -v update-desktop-database >/dev/null 2>&1 && update-desktop-database -q || true
|
||||||
if command -v kbuildsycoca6 >/dev/null 2>&1; then
|
if command -v kbuildsycoca6 >/dev/null 2>&1; then
|
||||||
kbuildsycoca6 --noincremental >/dev/null 2>&1 || true
|
kbuildsycoca6 --noincremental >/dev/null 2>&1 || true
|
||||||
elif command -v kbuildsycoca5 >/dev/null 2>&1; then
|
elif command -v kbuildsycoca5 >/dev/null 2>&1; then
|
||||||
kbuildsycoca5 --noincremental >/dev/null 2>&1 || true
|
kbuildsycoca5 --noincremental >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "✅ BackTunnel installed. You may need to restart your shell and Dolphin."
|
echo "BackTunnel removed."
|
||||||
|
|||||||
Reference in New Issue
Block a user