initial commit [141.14.140.180,mike]
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/perl
|
||||
#################################################################################### telemetry setup (mwx'2020)
|
||||
|
||||
&setupcron();
|
||||
|
||||
|
||||
####################################################################################################### SUPPORT
|
||||
|
||||
sub setupcron() {
|
||||
open(CRON,"crontab -l |");
|
||||
while(<CRON>) {
|
||||
chomp();
|
||||
push(@CRON,$_) if (!/\/db\/bin\/telemetry/);
|
||||
}
|
||||
|
||||
push(@CRON,"*/5 * * * * /db/bin/telemetry > /dev/null 2>&1");
|
||||
|
||||
open(OUT,"> /tmp/cron.$$");
|
||||
for (@CRON) {
|
||||
print OUT "$_\n";
|
||||
}
|
||||
close(OUT);
|
||||
system("/usr/bin/crontab /tmp/cron.$$");
|
||||
system("rm -f /tmp/cron.$$");
|
||||
}
|
||||
|
||||
|
||||
########################################################################################################### END
|
||||
Reference in New Issue
Block a user