Skip to content

Instantly share code, notes, and snippets.

@rubenkr
Created September 2, 2020 10:22
Show Gist options
  • Save rubenkr/b636d3bdbca16333ff0c0b60fcd6c2ae to your computer and use it in GitHub Desktop.
Save rubenkr/b636d3bdbca16333ff0c0b60fcd6c2ae to your computer and use it in GitHub Desktop.
# Übergabe Parameter/Input erfolgt in Perl mit $ARGV[1] in BASH mit $1
# TO ist Pushover kreiiert email addresse
#!/usr/bin/perl
use strict;
my($mailprog) = '/usr/sbin/sendmail -v -S 192.168.1.52:25 ';
my($from_address) ='[email protected]';
my($to_address) ='[email protected]';
open (MAIL, "|$mailprog -t $to_address") || die "Can't open $mailprog!\n";
print MAIL "To: $to_address\n";
print MAIL "From: $from_address\n";
print MAIL "Subject: DVR | New Recording";
print MAIL "$ARGV[2]\n";
print MAIL "New recording $ARGV[1] \n";
close (MAIL);
# Start Encoding Script
system("/bin/bash /config/convert-mkv2mp4.sh $ARGV[1] $ARGV[2]");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment