From: Chris Koeritz Date: Thu, 10 May 2018 00:13:07 +0000 (-0400) Subject: script launches app into the background via screen X-Git-Tag: 2.140.112^2~51 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=599271b2ef684294544a5d4b31f77546ddde974b 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. --- 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" + + + +