Skip to content

Commit b103159

Browse files
Updated documentation in audit_linux_system.sh
1 parent a05e2a0 commit b103159

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

audit_linux_system.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@
2222
# Script requirements 1:
2323
# yum update && yum install bacula-client vim parted pciutils yum-plugin-security yum-plugin-verify yum-plugin-changelog lsusb lshw usbutils lsscsi pigz mlocate time glances tuned redhat-lsb-core etckeeper firewalld mailx policycoreutils-python policycoreutils-newrole policycoreutils-restorecond setools-console lsof iotop htop tree mutt psacct
2424
#
25-
# Script requirements 2: for initial setup the etckeeper, please run next command from root user
25+
# Script requirements 2:
26+
# for initial setup the etckeeper, please run next command from root user
2627
# cd /etc
2728
# sudo etckeeper init
2829
# sudo etckeeper commit "Initial import"
2930
# git config --global user.name "root"
3031
# git config --global user.email [email protected]
3132
#
32-
# Addditional requirements: for initial setup the bacula scripts, please run next command from root user
33+
# Additional requirements and enhancement:
34+
# for initial setup the bacula scripts, please run next command from root user
3335
# cd /etc/bacula/scripts
3436
# setenforce 0
3537
# tail -fn 0 /var/log/audit/audit.log | grep bacula > /etc/bacula/bacula-audit.log
@@ -67,19 +69,21 @@
6769
# setenforce 1
6870
#
6971
#
72+
#
7073
# Script Submitted and Deployment in Production environments by:
7174
# Mykola Perehinets (mperehin)
7275
# Tel: +380 67 772 6910
7376
7477
#
7578
#######################################################################################################################
7679
# Script modified date
77-
Version=06012022
80+
Version=11012022
7881
#
7982
#######################################################################################################################
80-
# Exit code
83+
# Exit code status
8184
ERR=0
82-
# Basic script configuration, etc...
85+
#
86+
# Basic Script Configuration, deploy parameters, mail, etc...
8387
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
8488
#
8589
@@ -99,7 +103,8 @@ auditlogdir=/etc/bacula/scripts
99103
#auditlogdirR=/RESTORE
100104
auditlogdirR=/RECOVERY
101105
#
102-
# Verify folders
106+
#######################################################################################################################
107+
# Verify all folders
103108
if [[ ! -e $auditlogdir ]]; then
104109
mkdir -p $auditlogdir
105110
elif [[ ! -d $auditlogdir ]]; then
@@ -113,6 +118,7 @@ elif [[ ! -d $auditlogdirR ]]; then
113118
fi
114119
#
115120
#######################################################################################################################
121+
# Run script
116122
cd $auditlogdir
117123
echo "WARNING: Please verify Script Version on your server HOST: $HOSTNAME"
118124
echo "OK... Audit your system has been START... Script Version in this server #$Version... "
@@ -386,7 +392,7 @@ echo "Create new backup inventory data and store in $auditlogdir/server_inventor
386392
echo "This audit/data file is needed for Disaster Recovery Plan using in Corporate Backup System Bacula!"
387393
#echo "OK... Audit your system has been DONE... Thank you..."
388394
#
389-
# Sending copy of data to DevOps MailGroup
395+
# Sending copy of audit/data to DevOps MailGroup
390396
msg="This is copy of inventory data from HOST: $HOSTNAME, verify at $DATE_START. This audit/data file is needed for bare metal recovery procedures... -->"
391397
#echo $msg
392398
#sed -e 's/$/\r/' $auditlogdir/server_inventory_$HOSTNAME.log | pigz --best --independent > $auditlogdir/server_inventory_$HOSTNAME.log.win.txt.gz
@@ -403,7 +409,7 @@ echo -n $msg | mutt -s "WARNING: inventory of HOST: $HOSTNAME -->" -a $auditlogd
403409
echo "Sending copy of this audit/data file to DevOps - MailGroup: $ADMIN "
404410
echo "OK... Very well... Please Start-up next Corporate Bacula Backup System procedures..."
405411
#
406-
# Exit code script status
412+
# Rial exit code status
407413
if [ "${ERR}" == "0" ]; then
408414
exit 0;
409415
else

0 commit comments

Comments
 (0)