rc.restart_webgui 634 Bytes
Newer Older
1
#!/usr/local/bin/php
Ad Schellevis's avatar
Ad Schellevis committed
2 3
<?php

4
require_once('config.inc');
5
require_once('interfaces.inc');
6
require_once('rrd.inc');
7 8
require_once('util.inc');
require_once('system.inc');
Ad Schellevis's avatar
Ad Schellevis committed
9

10
if (count($argv) > 1 && is_numeric($argv[1])) {
11
    // starting delayed.
12
    sleep($argv[1]);
13 14
}

15 16
system_firmware_configure();

17
echo 'Restarting webConfigurator...';
Ad Schellevis's avatar
Ad Schellevis committed
18

19
killbyname('lighttpd');
Ad Schellevis's avatar
Ad Schellevis committed
20

21 22 23 24 25
/*
 * Force reloading all php-cgi children to
 * avoid hiccups with moved include files.
 */
killbyname('php-cgi', 'HUP');
26

27
while (is_process_running('lighttpd')) {
Ad Schellevis's avatar
Ad Schellevis committed
28 29 30 31 32 33 34
        echo '.';
        sleep(1);
}

system_webgui_start();
enable_rrd_graphing();

35
echo 'done.' . PHP_EOL;