Skip to content

Commit

Permalink
Add new launch option: open in screen
Browse files Browse the repository at this point in the history
  • Loading branch information
vdeville committed Jul 11, 2017
1 parent 161362e commit 4335298
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions launch.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash

OPTION=$(dialog --title "Twitch Bot" --menu "What do you want ?" 10 78 2 \
OPTION=$(dialog --title "Twitch Bot" --menu "What do you want ?" 10 78 3 \
"1" "Launch the bot" \
"2" "Dump autoload" 3>&1 1>&2 2>&3)
"2" "Launch in screen" \
"3" "Dump autoload" 3>&1 1>&2 2>&3)

STATUS=$?
if [ $STATUS = 0 ]; then
Expand All @@ -11,6 +12,10 @@ if [ $STATUS = 0 ]; then
php bot.php
;;
2)
screen -Sdm twitch-bot php bot.php
dialog --title "Twitch Bot" --msgbox "You can re-attach the screen by typing: screen -r twitch-bot" 10 78
;;
3)
php composer.phar dumpautoload &> /dev/null
;;
*)
Expand Down

0 comments on commit 4335298

Please sign in to comment.