Go to file
2015-12-21 00:36:15 +10:00
00logwatch Added 00logwatch 2015-11-22 22:43:43 +10:00
check_updates_deb.sh Added check_updates_rpm.sh for RPM distros. 2015-11-23 23:00:09 +10:00
check_updates_rpm.sh Added check_updates_rpm.sh for RPM distros. 2015-11-23 23:00:09 +10:00
dbbackup.sh Updated README.md 2015-12-07 00:43:29 +10:00
diskalert.sh Changed email address to support@comprofix.com for some scripts 2015-11-23 00:18:22 +10:00
gitlabbackup.sh Added rotate backups, updated diskalert for email 2015-06-13 14:17:16 +10:00
nasbackup.sh Updated rsync command for new nfs mount 2015-12-21 00:36:15 +10:00
README.md Updated README.md 2015-12-07 00:43:29 +10:00
rkhunter.sh Changed email address to support@comprofix.com for some scripts 2015-11-23 00:18:22 +10:00
squidguard-blacklists.sh Added squidguard-blacklists.sh 2015-12-07 10:11:12 +10:00

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

Change the following lines in scripts that send emails

Edit the following for emails:


MAILTO="support@comprofix.com"
SMTP=mail.comprofix.com
MAILFROM="support@comprofix.com"

00logwatch

This script sends a report based on the log files and settings.

Installation


apt-get install logwatch
ln -s $(pwd)/00logwatch /etc/cron.daily

check_updates_deb_sh

This script checks for updates on your debian system. 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

check_updates_rpm.sh

This is the same as above but for use on rpm based distributions (CentOS, Fedora etc)

This script has been tested and used on CentOS.

dbbackup.sh

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'
DBPASS='EWFfP3GZsqr427Yj'
BACKUPDIR='/BACKUP/db/'

diskalert.sh

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

nasbackup.sh

This script does an rsync from one folder location to another

Installation


ln -s ${PWD}/nasbackup.sh /etc/cron.daily

rkhunter.sh

Script sends an email with the rkhunter scan and report.

Installation


apt-get install rkhunter
ln -s ${PWD}/rkhunter.sh /etc/cron.daily