diff options
author | 2005-09-07 05:34:31 +0000 | |
---|---|---|
committer | 2005-09-07 05:34:31 +0000 | |
commit | cc27fad28fc851a4428350c095ad2e8996f4f043 (patch) | |
tree | cc27613387699fd223afff1147451accb372609f | |
parent | Added comment plugin (diff) | |
download | misc-cc27fad28fc851a4428350c095ad2e8996f4f043.tar.gz misc-cc27fad28fc851a4428350c095ad2e8996f4f043.tar.bz2 misc-cc27fad28fc851a4428350c095ad2e8996f4f043.zip |
Added new scripts version
svn path=/local/; revision=373
-rw-r--r-- | z-distfiles/Makefile | 2 | ||||
-rwxr-xr-x | z-distfiles/scripts-gw/birthDay | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/z-distfiles/Makefile b/z-distfiles/Makefile index 95aa88d..ff79495 100644 --- a/z-distfiles/Makefile +++ b/z-distfiles/Makefile @@ -1,5 +1,5 @@ DOWNLOAD_DIR=/var/www/www.gunnarwrobel.de/htdocs/downloads/ -VERSION=1.2 +VERSION=1.2.1 TAR=tar cvfj TAREX=--exclude="CVS" --exclude=".svn" --exclude=*~ diff --git a/z-distfiles/scripts-gw/birthDay b/z-distfiles/scripts-gw/birthDay index b0acb56..f0f5e03 100755 --- a/z-distfiles/scripts-gw/birthDay +++ b/z-distfiles/scripts-gw/birthDay @@ -6,11 +6,7 @@ use Net::SMTP; ($year,$month,$day) = Today(); ($hour,$min,$sec) = Now(); -my $server = $ARGV[0]; -my $ldapdc = $ARGV[1]; -my $ldpass = $ARGV[2]; - -system("ldapsearch -x -LL -H $server -b $ldapdc -s sub -D cn=admin,$ldapdc -w $ldpass \"(birthDate=*)\" cn mail birthDate > /tmp/birthday.tmp"); +system('ldapsearch -x -LL -H ldap://127.0.0.1 -b dc=gunnarwrobel,dc=de -s sub -D cn=admin,dc=gunnarwrobel,dc=de -w 38milchfett "(birthDate=*)" cn mail birthDate > /root/tmp/birthday.tmp'); open BDAY, "</tmp/birthday.tmp"; @@ -51,10 +47,9 @@ foreach $user (keys %bday) system("rm /tmp/birthday.tmp"); sub bdayMail { - $smtp = Net::SMTP->new('localhost') - or die "Can't connect SMTP localhost!\n"; $recp{'post@gunnarwrobel.de'}{"NAME"} = "Gunnar"; + $recp{'post@siwwrobel.de'}{"NAME"} = "Siw"; $date = sprintf("%.3s, %02d %.3s %d %d:%d:%d +0200", Day_of_Week_to_Text(Day_of_Week($year,$month,$day)), @@ -64,6 +59,9 @@ sub bdayMail { foreach $localname (keys %recp) { + $smtp = Net::SMTP->new('localhost') + or die "Can't connect SMTP localhost!\n"; + $mail = 'From: Birthday Skript <system@gunnarwrobel.de>' . "\n"; $mail .= "To: " . $recp{$localname}{"NAME"} . " <" . $localname .">\n"; $mail .= "Date: " . $date . "\n"; |