add check for file to do screen always
This commit is contained in:
parent
a0acdd69af
commit
376f3ecc24
1 changed files with 25 additions and 24 deletions
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
# Create a Screen session everytime, unless you don't want
|
||||
|
||||
screen_cmd=$(which screen)
|
||||
if [ -n "${screen_cmd}" ]; then
|
||||
if [ -e ~/.always_screen ]; then
|
||||
screen_cmd=$(which screen)
|
||||
if [ -n "${screen_cmd}" ]; then
|
||||
if [ -n "${STY}" ]; then
|
||||
session_name="${STY//[0-9]*\./}"
|
||||
echo "This is screen session '${session_name}'"
|
||||
|
@ -30,6 +30,7 @@ if [ -n "${screen_cmd}" ]; then
|
|||
echo "Ok, I'll leave you alone without a session..."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
else
|
||||
echo "Screen is not installed. Install it so always_screen in your bashrc will work."
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue