From f53716a32c2c1626ab565b1c42bacc67bc18e969 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 30 Apr 2012 16:50:48 -0400 Subject: [PATCH] new scripts for managing exim email server, plus a handy thing that zips up directories. --- scripts/email/exim_del_frozen.sh | 2 ++ scripts/email/exim_list_frozen.sh | 3 +++ scripts/email/exim_thaw.sh | 2 ++ scripts/files/zip_directories.sh | 11 +++++++++++ 4 files changed, 18 insertions(+) create mode 100644 scripts/email/exim_del_frozen.sh create mode 100644 scripts/email/exim_list_frozen.sh create mode 100644 scripts/email/exim_thaw.sh create mode 100644 scripts/files/zip_directories.sh diff --git a/scripts/email/exim_del_frozen.sh b/scripts/email/exim_del_frozen.sh new file mode 100644 index 00000000..af55cb3a --- /dev/null +++ b/scripts/email/exim_del_frozen.sh @@ -0,0 +1,2 @@ + +mailq | grep frozen | awk '{print $3}' | xargs exim -v -Mrm diff --git a/scripts/email/exim_list_frozen.sh b/scripts/email/exim_list_frozen.sh new file mode 100644 index 00000000..10825497 --- /dev/null +++ b/scripts/email/exim_list_frozen.sh @@ -0,0 +1,3 @@ + +mailq | grep frozen | awk '{print $3}' + diff --git a/scripts/email/exim_thaw.sh b/scripts/email/exim_thaw.sh new file mode 100644 index 00000000..c43282b3 --- /dev/null +++ b/scripts/email/exim_thaw.sh @@ -0,0 +1,2 @@ + +mailq | grep frozen | awk '{print $3}' | xargs exim -v -M diff --git a/scripts/files/zip_directories.sh b/scripts/files/zip_directories.sh new file mode 100644 index 00000000..1b5e5d01 --- /dev/null +++ b/scripts/files/zip_directories.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# goes through the current directory (currently) and zips up any directories +# into an archive with the same name as the directory plus a time stamp. + +source $FEISTY_MEOW_SCRIPTS/core/functions.sh + +#hmmm: take a dir to go to for this. +dir=. + +for i in $(find $dir -mindepth 1 -maxdepth 1 -type d) ; do zip -rm "${i}_$(date_stringer)" "$i"; done -- 2.34.1