| | |
| | | */ |
| | | |
| | | $app->modules->registerTableHook('web_domain','web_module','process'); |
| | | $app->modules->registerTableHook('ftp_user','web_module','process'); |
| | | $app->modules->registerTableHook('shell_user','web_module','process'); |
| | | $app->modules->registerTableHook('ftp_user','web_module','process'); |
| | | $app->modules->registerTableHook('shell_user','web_module','process'); |
| | | $app->modules->registerTableHook('webdav_user','web_module','process'); |
| | | |
| | | // Register service |
| | |
| | | |
| | | // This function is used |
| | | function restartHttpd($action = 'restart') { |
| | | global $app; |
| | | global $app,$conf; |
| | | |
| | | $command = ''; |
| | | if(is_file('/etc/init.d/httpd')) { |
| | | $command = '/etc/init.d/httpd'; |
| | | $daemon = ''; |
| | | if(is_file($conf['init_scripts'] . '/' . 'httpd')) { |
| | | $daemon = 'httpd'; |
| | | } else { |
| | | $command = '/etc/init.d/apache2'; |
| | | $daemon = 'apache2'; |
| | | } |
| | | |
| | | if($action == 'restart') { |
| | | exec($command.' restart'); |
| | | exec($conf['init_scripts'] . '/' . $daemon . ' restart'); |
| | | } else { |
| | | exec($command.' reload'); |
| | | exec($conf['init_scripts'] . '/' . $daemon . ' reload'); |
| | | } |
| | | |
| | | } |
| | | |
| | | } // end class |
| | | |
| | | ?> |
| | | ?> |