Last active
December 23, 2015 12:49
-
-
Save dirkk0/6638167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| echo "<pre>executiong ...</pre>"; | |
| $output = shell_exec('/var/www/createBackup.sh'); | |
| echo "<pre>$output</pre>"; | |
| echo "<pre>....done.</pre>"; | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| touch del.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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