summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c087c3)
raw | patch | inline | side by side (parent: 2c087c3)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Nov 2008 13:16:48 +0000 (13:16 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Nov 2008 13:16:48 +0000 (13:16 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12966 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/client/events/gosaTriggered.pm | patch | blob | history |
index 6edc2758f383a9b398898e0db87c36770ca19461..dca6f63088b9a377e52069f3d6a7bfc076c4900a 100644 (file)
use GOSA::GosaSupportDaemon;
use Data::Dumper;
use MIME::Base64;
-use Data::Random qw(:all);
+use File::Temp qw/ tempfile/;
BEGIN {}
my $subject = &decode_base64(@{$msg_hash->{'subject'}}[0]);
my $message = &decode_base64(@{$msg_hash->{'message'}}[0]);
- my $rand_file = "/tmp/goto_notify_".join("",rand_chars(set=>'alphanumeric', min=>16, max=>16));
- open(DATEI, ">$rand_file");
- print DATEI "source:$source\ntarget:$target\nusr:$to\nsubject:".@{$msg_hash->{'subject'}}[0]."\nmessage:".@{$msg_hash->{'message'}}[0]."\n";
- close DATEI;
+ my ($rand_fh, $rand_file) = tempfile( SUFFIX => '.goto_notify');
+ print $rand_fh "source:$source\ntarget:$target\nusr:$to\nsubject:".@{$msg_hash->{'subject'}}[0]."\nmessage:".@{$msg_hash->{'message'}}[0]."\n";
+ close $rand_fh;
my $feedback = system("/usr/bin/goto-notify user-message '$to' '$subject' '$message' '$rand_file' &" );