-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathersh
More file actions
executable file
·29 lines (22 loc) · 931 Bytes
/
Copy pathersh
File metadata and controls
executable file
·29 lines (22 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
if [ -z "$1" ]; then
node_port=8091;
node_postfix="xx";
else
node_port=`expr 9000 + $1`;
node_postfix=$1
fi
erl_cookie=$(wget -O- -q --user Administrator --password asdasd --post-data="erlang:get_cookie()." http://127.0.0.1:$node_port/diag/eval; echo)
erl_cookie=${erl_cookie//\'}
erl_node=$(wget -O- -q --user Administrator --password asdasd --post-data="erlang:node()." http://127.0.0.1:$node_port/diag/eval; echo)
erl_node=${erl_node//\'}
this_node="node_$node_postfix@127.0.0.1"
echo "Local node: $this_node"
echo "Remote node: $erl_node"
echo "Cookie: $erl_cookie"
if [ -z "$erl_node" ]; then
echo "Node No. $node_postfix is not started"
exit 1
fi
echo erl -name $this_node -remsh $erl_node -setcookie $erl_cookie -kernel inetrc '"/Users/artem/work/cbmisc/hosts.cfg"'
erl -name $this_node -remsh $erl_node -setcookie $erl_cookie -kernel inetrc '"/Users/artem/work/cbmisc/hosts.cfg"'