Hi folks,
Im having trouble with an expect command in a shell script I use to back up mac os x servers. This one is being run on a 10.8.2 Server as part of a larger bash script.
HiOpenVPN can be configured to launch a script each time a client connect. In this script, I would like to send a mail using the classic /bin/mail command.SELinux does... [by BrnVrn]
I use the following to send an email at the end of a script.
echo "Script finished on `date`" | /usr/bin/Mail -s "Script complete" "myaccount@myserver.com".
However, I want to echo the same message onto the screen as well. How do I do that in the same statement?
I have to setup a mail server because my hosting account don't allow me to send over 250 mail/hour.
I have a HP microserver at home and I want to use it to send the mails.
I configured Virtualmin on it and i created the domain example.com in it (I have example.com registered with hosting on my hoster) but when I tried to send mail from outlook, my server send the emails, but gmail mark it as spam
Hi Guys
I have written a cronjob that runs a script and dumps the output in a file
I then have another cron that runs 10mins later and will email the result using the mail command
Code:
mail -s "Mac PostFix Commands" email_address < /tmp/macoutput
the problem is if the first cron returns nothing the second one will just send a blank email, is there a way to make it only send
Hi
I'm trying to run a script " abc.sh" which triggers "use.sh" .
abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script.
Please find below the scripts:
#abc.sh
Code:
#!/usr/bin/expect -f
exec /root/use.sh
expect "*name*"
send "baddy\r"
expect "*word*"
send "compaq\r&qu
I need to write a script which can send files via sftp communication continously for half an hour or any given duration of time. I have already written a batch file to send multiple file via SFTP.
but I need to know how can we set a duration of half an hour through shell script. Can we use sleep command for this.
Any help would be appreciated.
Thanks
I am new to shell scripting. How would I write a script which can send an alert mail if there is no entry in the log file for more than 3 hours.
I want to insert "rm $0" in an script (/home/user/config-script) located on remote server with echo "rm $0">>/home/user/config-script with expect. But fail because expect interprets $0.