Diff for scripts/perl/syswatcher/syswatcher.pl between version 1.1 and 1.2
| version 1.1, 2003/11/10 17:36:57 |
version 1.2, 2003/11/13 17:28:52 |
|
|
| # 16/10/2003 - added automatic database reconnecting (nepto) |
# 16/10/2003 - added automatic database reconnecting (nepto) |
| # |
# |
| |
|
| # $Platon$ |
# $Platon: scripts/syswatcher/syswatcher.pl,v 1.1 2003/11/10 17:36:57 rajo Exp $ |
| |
|
| use strict; |
use strict; |
| |
|
|
|
| sleep $update_interval; |
sleep $update_interval; |
| |
|
| my $modify_time = -86400.0 * -M $0; |
my $modify_time = -86400.0 * -M $0; |
| if ($modify_time > 0) { # Autorestart |
if (defined $modify_time && $modify_time > 0) { # Autorestart - if file exists and is modified |
| print_info("Script '$0' MODIFIED $modify_time seconds after startup, restarting ..."); |
print_info("Script '$0' MODIFIED $modify_time seconds after startup, restarting ..."); |
| sleep $update_interval; |
|
| exec $0; |
exec $0; |
| } |
} |
| } |
} |
Platon Group <platon@platon.org> http://platon.org/
|
|