summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2016-03-14 01:29:56 +0100
committeranonym <anonym@riseup.net>2016-03-14 12:11:45 +0100
commit739e6f457d67930625e0970bf1fd4c318005831d (patch)
treecde10d640952e07fd7efe7fb16ad06e05bf0777b
parent26b3476b929e7ab6157717380718f7f6386134ed (diff)
Add minimal GUI for tails-mumble-server.
-rw-r--r--.gitignore1
-rw-r--r--config/chroot_local-includes/usr/local/bin/tails-mumble-server-gui39
-rw-r--r--config/chroot_local-includes/usr/share/applications/tails-mumble-server-gui.desktop.in9
-rw-r--r--po/POTFILES.in2
-rwxr-xr-xrefresh-translations1
5 files changed, 52 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 0a21850..b8b6479 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,6 +47,7 @@
/config/chroot_local-includes/usr/share/applications/i2p-browser.desktop
/config/chroot_local-includes/usr/share/applications/tor-browser.desktop
/config/chroot_local-includes/usr/share/applications/tails-about.desktop
+/config/chroot_local-includes/usr/share/applications/tails-mumble-server-gui.desktop
/config/chroot_local-includes/usr/share/desktop-directories/Tails.directory
/tmp/
diff --git a/config/chroot_local-includes/usr/local/bin/tails-mumble-server-gui b/config/chroot_local-includes/usr/local/bin/tails-mumble-server-gui
new file mode 100644
index 0000000..22a2f92
--- /dev/null
+++ b/config/chroot_local-includes/usr/local/bin/tails-mumble-server-gui
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+set -u
+
+. gettext.sh
+TEXTDOMAIN="tails"
+export TEXTDOMAIN
+
+# Import no_abort()
+. /usr/local/lib/tails-shell-library/common.sh
+
+if ! systemctl is-active mumble-server && \
+ ! zenity --question --title "`gettext \"Start Mumble server?\"`" \
+ --text "`gettext \"This starts a voice-enabled chat server. Do you want to proceed?\"`"; then
+ exit 0
+fi
+
+CONN_INFO_FILE="$(mktemp)"
+ERROR_LOG="$(mktemp)"
+trap "rm -f ${CONN_INFO_FILE} ${ERROR_LOG}" EXIT
+
+no_abort sudo /usr/local/sbin/tails-mumble-server \
+ > "${CONN_INFO_FILE}" 2> "${ERROR_LOG}"
+
+if [ "${_NO_ABORT_RET}" -eq 0 ]; then
+ CONN_INFO="`gettext \"Connection information:
+
+$(cat ${CONN_INFO_FILE})\"`"
+ zenity --question --title "`gettext \"Mumble server is running\"`" \
+ --text "${CONN_INFO}" \
+ --ok-label "`gettext \"Keep running\"`" \
+ --cancel-label "`gettext \"Stop\"`" || \
+ exec sudo /usr/local/sbin/tails-mumble-server --quit
+else
+ zenity --error --title "`gettext \"Mumble server error\"`" \
+ --text "$(cat "${ERROR_LOG}")"
+fi
+exit "${_NO_ABORT_RET}"
diff --git a/config/chroot_local-includes/usr/share/applications/tails-mumble-server-gui.desktop.in b/config/chroot_local-includes/usr/share/applications/tails-mumble-server-gui.desktop.in
new file mode 100644
index 0000000..214bb34
--- /dev/null
+++ b/config/chroot_local-includes/usr/share/applications/tails-mumble-server-gui.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+_Name=Mumble Server
+_Comment=Start a voice-enabled chat server
+Exec=/usr/local/bin/tails-mumble-server-gui
+Icon=mumble
+Terminal=false
+Categories=Network;
+StartupNotify=true
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9ff01b6..29badad 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,6 +8,7 @@ tmp/pot/shutdown-helper-extension.js.pot
tmp/pot/tails-about.pot
tmp/pot/tails-additional-software.pot
tmp/pot/tails-htp-notify-user.pot
+tmp/pot/tails-mumble-server-gui.pot
tmp/pot/tails-security-check.pot
tmp/pot/tails-spoof-mac.pot
tmp/pot/tails-upgrade-frontend-wrapper.pot
@@ -22,6 +23,7 @@ config/chroot_local-includes/etc/skel/Desktop/tails-documentation.desktop.in
config/chroot_local-includes/usr/share/applications/tails-documentation.desktop.in
config/chroot_local-includes/usr/share/applications/i2p-browser.desktop.in
config/chroot_local-includes/usr/share/applications/tails-about.desktop.in
+config/chroot_local-includes/usr/share/applications/tails-mumble-server-gui.desktop.in
config/chroot_local-includes/usr/share/applications/tails-reboot.desktop.in
config/chroot_local-includes/usr/share/applications/tails-shutdown.desktop.in
config/chroot_local-includes/usr/share/applications/tor-browser.desktop.in
diff --git a/refresh-translations b/refresh-translations
index 2139cb0..458d99f 100755
--- a/refresh-translations
+++ b/refresh-translations
@@ -11,6 +11,7 @@ PYTHON_PROGS="/etc/whisperback/config.py \
SHELL_PROGS="/etc/NetworkManager/dispatcher.d/60-tor-ready.sh \
/usr/local/bin/electrum \
/usr/local/bin/icedove \
+ /usr/local/bin/tails-mumble-server-gui \
/usr/local/bin/tails-upgrade-frontend-wrapper \
/usr/local/lib/tails-spoof-mac \
/usr/local/sbin/tails-i2p \