script launches app into the background via screen
[feisty_meow.git] / scripts / system / screeno.sh
diff --git a/scripts/system/screeno.sh b/scripts/system/screeno.sh
new file mode 100644 (file)
index 0000000..5217d70
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# screeno: a simple alias for putting something in the background where its logs can be
+# tended by the screen utility.
+
+app="$1"; shift
+title="$1"; shift
+if [ -z "$app" ]; then
+#print_instructions
+  echo This utility needs an application name to launch into the background.
+  echo The app will be managed via the screen utility so its logs are available
+  echo later, plus it can be interacted with directly.
+  exit 1
+fi
+if [ -z "$title" ]; then
+  title="$app"
+#hmmm: we should be sanitizing that guy!  don't want a long deal title.
+fi
+
+screen -L -S "$title" -d -m "$app"
+
+
+
+