2018-02-12 00:47:18 +00:00
|
|
|
#!/bin/bash
|
2020-01-19 19:06:16 +00:00
|
|
|
[ -e r0c/__main__.py ] || cd ..
|
|
|
|
[ -e r0c/__main__.py ] || cd ~/dev/r0c
|
|
|
|
[ -e r0c/__main__.py ] || exit 1
|
2018-01-08 22:47:21 +00:00
|
|
|
|
|
|
|
ports='2323 1531'
|
2020-01-19 19:06:16 +00:00
|
|
|
[ $(id -u) -eq 0 ] &&
|
2018-01-08 22:47:21 +00:00
|
|
|
ports='23 531'
|
|
|
|
|
|
|
|
while true
|
|
|
|
do
|
|
|
|
for n in 2 3
|
|
|
|
do
|
|
|
|
printf '\n\033[0;1;33mstarting py%s\033[0m\n\n' $n
|
2018-02-10 16:07:18 +00:00
|
|
|
sleep 0.5 || break
|
2018-01-08 22:47:21 +00:00
|
|
|
|
|
|
|
python$n -m r0c $ports
|
|
|
|
|
2020-01-19 19:06:16 +00:00
|
|
|
[ $? -eq 1 ] &&
|
2018-01-08 22:47:21 +00:00
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
done
|
2018-01-07 09:29:36 +00:00
|
|
|
|