#!/usr/bin/env php . */ /** * Sends control signals to running queue daemons. * * @author Brion Vibber * @package QueueHandler */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $shortoptions = 'ur'; $longoptions = array('update', 'restart', 'stop'); $helptext = <<sendControlSignal($event, $param)) { print " sent.\n"; } else { print " FAILED.\n"; } } $actions = 0; if (have_option('u') || have_option('--update')) { $nickname = common_config('site', 'nickname'); doSendControl("Sending site update signal to queue daemons for $nickname", "update", $nickname); $actions++; } if (have_option('r') || have_option('--restart')) { doSendControl("Sending graceful restart signal to queue daemons...", "restart"); $actions++; } if (have_option('--stop')) { doSendControl("Sending graceful shutdown signal to queue daemons...", "shutdown"); $actions++; } if (!$actions) { show_help(); }