Skip to content

Instantly share code, notes, and snippets.

@4noha
Created January 9, 2017 16:58
Show Gist options
  • Save 4noha/76768a39e2b1565cd0670120631a5871 to your computer and use it in GitHub Desktop.
Save 4noha/76768a39e2b1565cd0670120631a5871 to your computer and use it in GitHub Desktop.
# 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