summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/usr/local/lib/create-tor-browser-directories
diff options
context:
space:
mode:
Diffstat (limited to 'config/chroot_local-includes/usr/local/lib/create-tor-browser-directories')
-rwxr-xr-xconfig/chroot_local-includes/usr/local/lib/create-tor-browser-directories15
1 files changed, 15 insertions, 0 deletions
diff --git a/config/chroot_local-includes/usr/local/lib/create-tor-browser-directories b/config/chroot_local-includes/usr/local/lib/create-tor-browser-directories
new file mode 100755
index 0000000..e1fe2c3
--- /dev/null
+++ b/config/chroot_local-includes/usr/local/lib/create-tor-browser-directories
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -eu
+
+TOR_BROWSER_AMNESIAC_DIR='/home/amnesia/Tor Browser'
+TOR_BROWSER_PERSISTENT_DIR='/home/amnesia/Persistent/Tor Browser'
+
+. /usr/local/lib/tails-shell-library/tails-greeter.sh
+
+install -d -o amnesia -g amnesia -m 0700 "$TOR_BROWSER_AMNESIAC_DIR"
+
+if persistence_is_enabled_for "${HOME}/Persistent" && \
+ persistence_is_enabled_read_write ; then
+ install -d -o amnesia -g amnesia -m 0700 "$TOR_BROWSER_PERSISTENT_DIR"
+fi