Skip to content

Instantly share code, notes, and snippets.

@dirkk0
Last active December 23, 2015 12:49
Show Gist options
  • Select an option

  • Save dirkk0/6638167 to your computer and use it in GitHub Desktop.

Select an option

Save dirkk0/6638167 to your computer and use it in GitHub Desktop.
<?
echo "<pre>executiong ...</pre>";
$output = shell_exec('/var/www/createBackup.sh');
echo "<pre>$output</pre>";
echo "<pre>....done.</pre>";
?>
while true
do
if [ -f /var/www/del.txt ]
then
echo done
# ./doit.sh
rm /var/www/del.txt
echo -e "subject:backup created\nbest, your server" | sendmail -v [email protected]
fi
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment