From 9ae1cd8f91aa6b53404e66588679d852d3972bcd Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Fri, 27 Sep 2013 23:10:53 +0200 Subject: 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. --- tools/sync_website | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100755 tools/sync_website (limited to 'tools/sync_website') diff --git a/tools/sync_website b/tools/sync_website deleted file mode 100755 index 8489bc54..00000000 --- a/tools/sync_website +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/perl -use strict; -use DBI; -#$ENV{PERL5LIB}="plugins-scripts"; # Needed for utils.pm - -unless ($ENV{DRUPAL_PASSWORD}) { - die "Must set envvar for DRUPAL_PASSWORD"; -} - -my $pid = open(F, "-|", qw(ssh -n -N -L 25555:127.0.0.1:3306 nagiosplugins.org)); - -# Allow time for ssh tunnel to be created -sleep 2; - -# To stop the death of ssh tunnel being defunct -$SIG{CHLD} = 'IGNORE'; - -END { kill 'INT', $pid if $pid }; - -my $dbh = DBI->connect("DBI:mysql:database=drupal;host=127.0.0.1;port=25555", "drupal", $ENV{DRUPAL_PASSWORD}); - -my @plugin_paths; -push @plugin_paths, (grep { -x $_ && -f $_ } (, ) ); - -foreach my $plugin_path (@plugin_paths) { - my $plugin = $plugin_path; - $plugin =~ s%.*/%%; - my $help_option = "--help"; - $help_option = "-h" if ($plugin eq "check_icmp"); - my $help = `$plugin_path $help_option` || die "Cannot run $plugin -h"; - $help =~ s//>/g; - - my $rows = $dbh->do("UPDATE node SET created=UNIX_TIMESTAMP(NOW()) WHERE title='$plugin'"); - unless ($rows == 1) { - die "Cannot find $plugin in drupal to update - create book page first"; - } - - $dbh->do("UPDATE node_revisions SET timestamp=UNIX_TIMESTAMP(NOW()), log='Updated by update_online_manpage', teaser='$plugin --help', body=? WHERE title='$plugin'", - {}, - "
".$help."
"); -} - -print "Finished\n"; -- cgit v1.2.3-74-g34f1