Skip to content

Instantly share code, notes, and snippets.

@NoNamePro0
Last active June 1, 2020 06:58
Show Gist options
  • Select an option

  • Save NoNamePro0/a5c70e8efbaa83f882720a84a541e3dc to your computer and use it in GitHub Desktop.

Select an option

Save NoNamePro0/a5c70e8efbaa83f882720a84a541e3dc to your computer and use it in GitHub Desktop.

Revisions

  1. NoNamePro0 revised this gist Jun 1, 2020. 1 changed file with 7 additions and 8 deletions.
    15 changes: 7 additions & 8 deletions start.sh
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,17 @@
    #!/bin/bash

    name='yourName'
    command='yourCommand'
    command="yourCommand" # Use ${0%/*} to go in the folder from the start.sh

    timeout='120'
    script_path="$PWD/${0##*/}"

    script_path="${0}"

    if [[ $1 == "--non-background" ]]
    then
    $command
    sleep $timeout
    $script_path
    exit
    $command
    sleep $timeout
    $script_path
    exit
    else
    screen -AmdS $name $script_path --non-background
    screen -AmdS $name $script_path --non-background
    fi
  2. NoNamePro0 revised this gist Jun 1, 2020. 1 changed file with 12 additions and 5 deletions.
    17 changes: 12 additions & 5 deletions start.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,18 @@
    #!/bin/bash

    name='yourName'
    command='yourCommand'

    timeout='120'
    script_path="$PWD/${0##*/}"


    if [[ $1 == "--non-background" ]]
    then
    yourCommand
    sleep 120
    ./start.sh
    exit
    $command
    sleep $timeout
    $script_path
    exit
    else
    screen -AmdS yourName ./start.sh --non-background
    screen -AmdS $name $script_path --non-background
    fi
  3. NoNamePro0 revised this gist May 21, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion start.sh
    Original file line number Diff line number Diff line change
    @@ -7,5 +7,5 @@ then
    ./start.sh
    exit
    else
    screen -AmdS soulbot ./start.sh --non-background
    screen -AmdS yourName ./start.sh --non-background
    fi
  4. NoNamePro0 revised this gist May 4, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions start.sh
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@ then
    yourCommand
    sleep 120
    ./start.sh
    exit
    else
    screen -AmdS soulbot ./start.sh --non-background
    fi
  5. NoNamePro0 created this gist May 4, 2020.
    10 changes: 10 additions & 0 deletions start.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/bin/bash

    if [[ $1 == "--non-background" ]]
    then
    yourCommand
    sleep 120
    ./start.sh
    else
    screen -AmdS soulbot ./start.sh --non-background
    fi