from from esx console command line using perl
- No Comments
- Dec, 16, 2010
- Angelo Schalley
- Linux, vmware
#!/usr/bin/perl -w
use Net::SMTP;
my $smtpServer = 'smtpserver.company.com';
my $mailFrom = 'sender@companyname.com';
my $mailTo = 'recipient@companyname.com';
my $subject = 'Test Mail';
my $emailFile = '/usr/local/bin/report.txt';
sendmail($smtpServer,$mailFrom,$mailTo,$subject,$emailFile);
sub sendmail {
my $smtpserver = $_[0];
my $sender = $_[1];
my $recipient = $_[2];
my $subject = $_[3];
my $filename = $_[4];
Read more on from from esx console command line using perl…
Bash script logging
- No Comments
- Dec, 16, 2010
- Angelo Schalley
- Linux, Plesk Linux
use
>> mylog ( after the file, use > to overwrite )
to just append to the file
date >> mylog
ls >> mylog
echo >> mylog
OR if You want all script output go the mylog
Read more on Bash script logging…
Using Crontab with Plesk to call PHP files (drupal – joomla – etc )
- No Comments
- Dec, 13, 2010
- Angelo Schalley
- html / php, joomla, Linux, Plesk Linux
Having battled with getting a php file to be called from a scheduled task (a.k.a. a crontab task) using the Plesk interface panel on a Linux box, I thought I’d share a bit of a how-to on it because I struggled to find anything helpful out there on the topic.
Read more on Using Crontab with Plesk to call PHP files (drupal – joomla – etc )…