Skip to content

mariusv/scripts

Repository files navigation

Description

You'll find here all the open-source code I produce. This is just a collection of tiny utility scripts, patches, hacks and forks I want to or have to redistribute with the open source community at large.

If for any reason one of these hacks get momentum, I'll move them to a stand-alone and dedicated project.

Script list

postfix-delete.pl

This script delete all queued messages from postfix

Usage:

For example, delete all queued messages from or to the domain called mariusv.com, enter:

./postfix-delete.pl mariusv.com

Delete all queued messages that contain the word "xyz" in the e-mail address:

./postfix-delete.pl xyz

duplicity-backup.pl

Backing up your server(or just one folder) with duplicity. Warning, this is for server to server via SSH!!

qmailclean.sh

Cleaning the qmail queue clean and simple

OpenVZ scripts to automate the creation of containers

This script has only one purpose, it is to help me create my OpenVZ containers. Since I use OpenVZ to create development servers I use a predefined amount of RAM for my servers. The script could be modified in such a way that we could specified this amount of RAM through the command line. I will probably end up doing it later.

Extract.pl will extract the necessary portions from a full database mysqldump file required to restore a single table.

Usage:

extract.pl -t

-r [options]

Required:

-t

table name to extract from the file

Optional:

-r mysqldump file that you want to parse. Uses STDIN if nothing is specified

--listTables If set, then a list of tables existing in your restore file is returned, and no other actions are taken

--noExtras If set, then extra cmds at top of mysqldump file will not be included (such as disabling foreign key checks).

Usually you will want these things changed before restoring a table, so the default is for these to be included.

-v verbosity - use multiple times for greater effect

-h Display this help message

exportcp.sh will extract all the contacts and email addresses from any reseller from cpanel

Usage:

chmod +x exportcp.sh

./exportcp.sh > exportlist.txt

About

My daily sysadmin scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published