1
0
mirror of https://github.com/pgrondek/config.git synced 2024-11-22 20:13:43 +00:00

[bash] Start server sesssions in screen if possible

This commit is contained in:
Przemyslaw Grondek 2019-07-15 11:19:55 +02:00
parent a05616ef25
commit c9695a0268

View File

@ -146,3 +146,16 @@ fi
export VISUAL=vim export VISUAL=vim
export EDITOR="$VISUAL" export EDITOR="$VISUAL"
# Start all sessions in screen when running on server
if [ "$computer_type" == "server" ]; then
if [ -d /usr/bin/screen ]; then
echo Server
if [ -z "$STY" ]; then
screen -R;
exit
fi
else
echo "Warning, no screen binary found"
fi
fi