diff --git a/README.md b/README.md index 608dbf0..557e9a4 100644 --- a/README.md +++ b/README.md @@ -4,101 +4,91 @@ Scripts for different tasks These scripts perform multiple of different tasks that help monitor the server and send emails after performing functions. To send emails the sendEmail package is required -
apt-get install sendemail
++apt-get install sendemail ++ Change the following lines in scripts that send emails MAILFROM is set to determine the server name and domain name for the server and generate and email for it to determine where the email is coming from. This can be changed to specify an email address or you can leave it to generate one. -
-MAILTO=user@example.com
+MAILTO=user@example.com
SMTP=mail.example.com
MAILFROM=$(hostaname)@$(dnsdomainname)
-
+
#### 00logwatch
This script sends a report based on the log files and settings.
Installation
-
-apt-get install logwatch
+apt-get install logwatch
ln -s $(pwd)/00logwatch /etc/cron.daily
-
+
-#### check_updates_deb_sh
+#### check_updates_deb
This script checks for updates on your Debian based systems. If any updates are found it will download them ready for Installation and an email will be sent to an email address specified
Installation
-
-ln -s $(pwd)/check_updates_deb_sh /etc/cron.daily
-
+ln -s $(pwd)/check_updates_deb /etc/cron.daily +-#### dbbackup.sh +#### check_updates_rpm + +This script checks for updates on your RPM based systems. If any updates are found it will download them ready for Installation and an email will be sent to an email address specified + +Installation +
ln -s $(pwd)/check_updates_rpm /etc/cron.daily ++ +#### dbbackup This scripts backs up mysql databases and rotates the number of backups through seven days. Specify the user and password that has access to the databases. -
-DBUSER='dbbackup'
+DBUSER='dbbackup'
DBPASS='EWFfP3GZsqr427Yj'
BACKUPDIR='/BACKUP/db/'
-
+
-#### diskalert.sh
+Installation
+ln -s $(pwd)/dbbackup /etc/cron.daily ++ +#### diskalert Sends and email when disk space reaches greater than 90%. Installation -
-ln -s ${pwd}/diskalert.sh /etc/cron.hourly
-
-
-#### gitlabbackup.sh
-
-If you run your own gitlab server.
-
-Add the following lines to /etc/gitlab/gitlab.rb once added run gitlab-ctl reconfigure for changes to take effect
-
-
-gitlab_rails['backup_path'] = 'BACKUP FOLDER'
-gitlab_rails['backup_keep_time'] = 604800 #7 days of backups to keep
-
-
-Change the BACKUP FOLDER to a location where you want the backups to be saved.
-
-Installation
-
-ln -s ${PWD}/gitlabbackup.sh /etc/cron.daily
-
+ln -s ${pwd}/diskalert.sh /etc/cron.hourly +#### nasbackup.sh This script does an rsync from one folder location to another Installation -
-ln -s ${PWD}/nasbackup.sh /etc/cron.daily
-
++ln -s ${PWD}/nasbackup /etc/cron.daily +-#### mailQWatch.sh +#### mailQWatch Script checks mailq size on a postfix system and sends an email when queue size is greater than threshold. Update variables in scripts to suit your needs. -
-QUEUELIMIT=75
+QUEUELIMIT=75
SUBJECT="Mail Queue on $HOST is currently $QUEUECOUNT"
MAILTO="user@example.com"
-
+
Installation
As root, sudo will not work.
-
-echo "*/5 * * * * ${PWD}/mailQWatch.sh" >> /etc/crontab
-
+echo "*/5 * * * * ${PWD}/mailQWatch.sh" >> /etc/crontab +diff --git a/check_updates_deb.sh b/check_updates_deb similarity index 100% rename from check_updates_deb.sh rename to check_updates_deb diff --git a/check_updates_rpm.sh b/check_updates_rpm similarity index 100% rename from check_updates_rpm.sh rename to check_updates_rpm diff --git a/dbbackup.sh b/dbbackup similarity index 100% rename from dbbackup.sh rename to dbbackup diff --git a/diskalert.sh b/diskalert similarity index 100% rename from diskalert.sh rename to diskalert diff --git a/gitlabbackup.sh b/gitlabbackup.sh deleted file mode 100755 index c314e21..0000000 --- a/gitlabbackup.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# Script Name: gitlabbackup -# Author: Matt McKinnon -# Date: 04 May 2018 -# Description: -# This script will backup your gitlab configuration files. -# Send an email report. -# Rotate backups for 7 days -# -# Add the following lines to /etc/gitlab/gitlab.rb once added -# run gitlab-ctl reconfigure for changes to take effect -# -# gitlab_rails['backup_path'] = '