diff options
| author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-27 23:10:53 +0200 |
|---|---|---|
| committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-27 23:10:53 +0200 |
| commit | 9ae1cd8f91aa6b53404e66588679d852d3972bcd (patch) | |
| tree | 1edc8a9ac8e36bf8fabeed7b7b3ad933d691438c /tools/update_man_pages | |
| parent | 983d10e0609175a26675a97129b9e7def18d5f35 (diff) | |
| download | monitoring-plugins-9ae1cd8f91aa6b53404e66588679d852d3972bcd.tar.gz | |
tools: Remove Drupal/SourceForge scripts
We moved our web site away from Drupal and the snapshots/guidelines away
from SourceForge. The new infrastructure scripts will be maintained in
a separate repository together with the Markdown source of the new web
site.
Diffstat (limited to 'tools/update_man_pages')
| -rwxr-xr-x | tools/update_man_pages | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tools/update_man_pages b/tools/update_man_pages deleted file mode 100755 index 5c4a901e..00000000 --- a/tools/update_man_pages +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | use strict; | ||
| 3 | use DBI; | ||
| 4 | #$ENV{PERL5LIB}="plugins-scripts"; # Needed for utils.pm | ||
| 5 | |||
| 6 | unless ($ENV{DRUPAL_PASSWORD}) { | ||
| 7 | die "Must set envvar for DRUPAL_PASSWORD"; | ||
| 8 | } | ||
| 9 | |||
| 10 | my $dbh = DBI->connect("DBI:mysql:database=www;host=127.0.0.1", "www", $ENV{DRUPAL_PASSWORD}); | ||
| 11 | |||
| 12 | my @plugin_paths; | ||
| 13 | push @plugin_paths, (grep { -x $_ && -f $_ } (<plugins-root/*>, <plugins/*>) ); | ||
| 14 | |||
| 15 | foreach my $plugin_path (@plugin_paths) { | ||
| 16 | my $plugin = $plugin_path; | ||
| 17 | $plugin =~ s%.*/%%; | ||
| 18 | my $help_option = "--help"; | ||
| 19 | $help_option = "-h" if ($plugin eq "check_icmp"); | ||
| 20 | my $help = `$plugin_path $help_option` || die "Cannot run $plugin -h"; | ||
| 21 | $help =~ s/</</g; | ||
| 22 | $help =~ s/>/>/g; | ||
| 23 | |||
| 24 | my $rows = $dbh->do("UPDATE node SET created=UNIX_TIMESTAMP(NOW()) WHERE title='$plugin'"); | ||
| 25 | unless ($rows == 1) { | ||
| 26 | die "Cannot find $plugin in drupal to update - create book page first"; | ||
| 27 | } | ||
| 28 | |||
| 29 | $dbh->do("UPDATE node_revisions SET timestamp=UNIX_TIMESTAMP(NOW()), log='Updated by update_online_manpage', teaser='$plugin --help', body=? WHERE title='$plugin'", | ||
| 30 | {}, | ||
| 31 | "<pre>".$help."</pre>"); | ||
| 32 | } | ||
| 33 | |||
| 34 | print "Finished\n"; | ||
