Created
January 9, 2017 16:58
-
-
Save 4noha/76768a39e2b1565cd0670120631a5871 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Print the IP address | |
| _IP=$(hostname -I) || true | |
| if [ "$_IP" ]; then | |
| printf "My IP address is %s\n" "$_IP" | |
| fi | |
| # tmux and server script | |
| DIR="/home/nokkii" | |
| $DIR/works/rcc_coffee_server/coffee_server-Guatemala/unix_ftdi_setup.sh | |
| su - nokkii -c 'tmux new-session -d -s works -n home -c "'$DIR'"' | |
| su - nokkii -c 'tmux new-window -n server -c "'$DIR'/works/rcc_coffee_server/coffee_server-Guatemala"' | |
| sleep 2 | |
| su - nokkii -s /bin/bash -c 'tmux send-keys -t server.0 "COFFEE_ADDRESS='$_IP':4567 ruby guatemala.rb -o 0.0.0.0" C-m' | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment