summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-10-03 19:15:15 +0200
committerJakob Unterwurzacher2015-10-03 19:17:31 +0200
commit0802175328821ff2d342d70a88cb9ff3d5d88963 (patch)
tree6b9a5aa51132d8797b19b7b7c70fa5930f9a10e2
parent79870ab0960febcbc82e32d632ed4a9ea99b6f03 (diff)
Add daemonization shell script
-rwxr-xr-xgocryptfs.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/gocryptfs.sh b/gocryptfs.sh
new file mode 100755
index 0000000..689708c
--- /dev/null
+++ b/gocryptfs.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Run the gocryptfs process in the background
+
+set -eu
+
+dir=$(dirname "$0")
+
+# This needs user input and cannot run in the background
+if [[ $* == *--init* ]]; then
+ "$dir/gocryptfs" $*
+else
+ "$dir/gocryptfs" $* & disown
+fi