-
Notifications
You must be signed in to change notification settings - Fork 1
/
upload_rca_param.sh
executable file
·48 lines (42 loc) · 1.19 KB
/
upload_rca_param.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
function list_rca_files(){
echo ''''''''''''''''''''''''''''''''''''''''''''''
echo These are the rca files available:
ls -l /data/rca
echo ''''''''''''''''''''''''''''''''''''''''''''''
}
while getopts ":i:p:u:w:h" opt; do
case $opt in
i) proxy_url="$OPTARG"
;;
p) proxy_port="$OPTARG"
;;
u) proxy_username="$OPTARG"
;;
w) proxy_pwd="$OPTARG"
;;
h) echo Command options:
echo -i : Proxy IP
echo -p : port
echo -u : proxy username
echo -w : proxy password
echo -h : Display this message and exit
exit 0
;;
esac
done
if [ ${#proxy_url} -le 1 ];
then echo "No proxy set. Proceeding";
elif [ ${#proxy_username} -le 1 ];
then echo "Setting proxy. No proxy credentials. Proceeding";
export https_proxy=http://$proxy_url:$proxy_port/ ;
else
echo "Setting proxy with credentials. Proceeding";
export https_proxy=http://$proxy_username:$proxy_pwd@$proxy_url:$proxy_port/ ;
fi
export PYTHONWARNINGS="ignore:Unverified HTTPS request"
list_rca_files
> nohup.out
if /opt/maglev/bin/python _main.py; then
nohup /opt/maglev/bin/python uploadRca.py &
fi