Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f0f653

Browse files
authored
Create run_auditbeat_exadata_dcli_c.sh
1 parent bb7d681 commit 8f0f653

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
if [ $# -lt 3 ]
2+
then
3+
4+
echo
5+
echo Usage: $0 mahine_to_run_on , appName , install or establish or install_and_establish or auditd_non_immutable
6+
echo
7+
exit 1
8+
9+
fi
10+
11+
machine=$1
12+
app=$2
13+
action=$3
14+
15+
script=auditbeat_exadata.sh
16+
script_basename=`basename $script`
17+
18+
remotedir=/root/tmp_${script_basename}_run
19+
20+
echo INFO - Creating $remotedir on $machine
21+
dcli -c $machine -l root "mkdir -p $remotedir"
22+
23+
echo INFO - Copying $script_basename, rpmfile and yml files to $machine:$remotedir
24+
scp -q $script ${machine}:${remotedir}/.
25+
scp -q auditbeat.yml.exadata-tvx ${machine}:${remotedir}/.
26+
scp -q auditbeat.yml.exadata-non-tvx ${machine}:${remotedir}/.
27+
28+
if [ "$action" == "install" ]
29+
then
30+
31+
scp -q auditbeat-6.2.4-x86_64.rpm ${machine}:${remotedir}/.
32+
33+
fi
34+
35+
if [ "$action" == "install_and_establish" ]
36+
then
37+
38+
scp -q auditbeat-6.2.4-x86_64.rpm ${machine}:${remotedir}/.
39+
40+
fi
41+
42+
dcli -c $machine -l root "chmod 700 ${remotedir}/${script_basename}; cd ${remotedir}; ${remotedir}/${script_basename} $app $action; cd /root; rm -rf $remotedir"
43+
echo
44+
echo

0 commit comments

Comments
 (0)