2f2e373c1a30dcd24fa825ed0bed815f556a632b
[platform/core/connectivity/net-config.git] / resources / opt / etc / dump.d / module.d / network_log_dump.sh
1 #!/bin/sh
2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
3
4 #--------------------------------------
5 #   network log dump
6 #--------------------------------------
7
8 # not allow to use relative path
9 if [[ $0 == "/"* ]]; then
10         echo "Absolute path"
11 else
12         echo "Relative path"
13         exit -1
14 fi
15
16 export DISPLAY=:0.0
17 NETWORK_DATA_DIR=/opt/usr/data/network
18
19 /usr/bin/tar -czf ${NETWORK_DATA_DIR}/network_file_log.tar.gz -C ${NETWORK_DATA_DIR} .