From 599271b2ef684294544a5d4b31f77546ddde974b Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Wed, 9 May 2018 20:13:07 -0400 Subject: [PATCH] script launches app into the background via screen this will take an app name and wrap the app in a screen session. second parm is a title, but the app name will be used if no title provided. very rudimentary right now but working. --- scripts/system/screeno.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 scripts/system/screeno.sh diff --git a/scripts/system/screeno.sh b/scripts/system/screeno.sh new file mode 100644 index 00000000..5217d70a --- /dev/null +++ b/scripts/system/screeno.sh @@ -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" + + + + -- 2.34.1