summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xnotify.pl5
-rwxr-xr-xsync-it.sh2
2 files changed, 4 insertions, 3 deletions
diff --git a/notify.pl b/notify.pl
index fa0a8c7..ee918bc 100755
--- a/notify.pl
+++ b/notify.pl
@@ -24,6 +24,7 @@ use warnings;
use autodie;
use POSIX qw(strftime);
use HTTP::Tiny;
+use File::Basename;
# get function and function_variable (vmid) from arguments
my $function = $ARGV[0] || "empty";
@@ -161,7 +162,7 @@ my @files = glob "$conf{'conf'}{'VMS'}/*.txt";
if ($function =~ /notify/) {
mailout(\%conf, \%vms);
-} elsif ($function =~ /(msg|deployed)/ and $function_variable !~ /empty/) {
+} elsif ($function =~ /(deployed|msg|thanx)/ and $function_variable !~ /empty/) {
my %slice = %vms{$function_variable};
mailout(\%conf, \%slice);
} elsif ($function =~ /(renewal|subscription|deprovision)/) {
@@ -186,5 +187,5 @@ if ($function =~ /notify/) {
}
mailout(\%conf, \%vms);
} else {
- print "Specify function: deployed <vmid>, stopped, renewal, notify, deprovision, msg <vmid>\n";
+ print "usage: " . basename($0) . " [stopped | renewal | notify | deprovision] | [deployed | msg | thanx] <vmid>\n";
}
diff --git a/sync-it.sh b/sync-it.sh
index be5e22c..a960bb3 100755
--- a/sync-it.sh
+++ b/sync-it.sh
@@ -15,4 +15,4 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
OPTIONS=${1:--qa}
-/usr/local/bin/rsync ${OPTIONS} /etc /home/mischa /var/nsd /var/unbound /var/www n1.high5.nl::obsdams/$(hostname -s) --del
+/usr/local/bin/rsync ${OPTIONS} /etc /home/mischa /var/nsd /var/unbound /var/www n2.high5.nl::obsdams/$(hostname -s) --del