Thank you for reply. I used to use in the following ways but still could not be verified:
[BEGIN] 2015/9/17 11:51:51
[postgres@pg95 ~]$ cat test.sh
#!/bin/bash
ip a |grep eth0
psql -h 100.200.100.211<<EOF
show authentication_timeout;
select now();
\! sh net_test.sh
select now();
EOF
[postgres@pg95 ~]$ cat net_test.sh
#!/bin/bash
sudo ifdown eth0
sleep 90
sudo ifup eth0
[postgres@pg95 ~]$ ./test.sh
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfif
o_fast state UP qlen 1000
authentication_timeout
------------------------
1min
(1 row)
now
-------------------------------
2015-09-17 11:52:43.842508+08
(1 row)
now
-------------------------------
2015-09-17 11:54:18.161079+08
(1 row)
[END] 2015/9/17 11:54:35
Could you give me an example to verify it? Let me verify it is active or not. thank you !!