Project

General

Profile

« Previous | Next » 

Revision 669e1adb

Added by Bill Marquette about 20 years ago

Various code cleanups and a few actual bugfixes courtesy of Zend

View differences:

etc/inc/service-utils.inc
34 34
 */
35 35

  
36 36
function write_rcfile($params) {
37
	global $config, $g;
38 37
	$fileprefix = "/usr/local/etc/rc.d/";
39 38
	if(!(is_writable($fileprefix . $params['file']) or $params['start'])) return false;
40 39
	$towrite .= "#!/bin/sh\n# This file was automatically generated\n# by the pfSense service handler.\n\n";
......
61 60
}
62 61

  
63 62
function start_service($name) {
64
	global $config, $g;
63
	global $config;
65 64
	if($config['installedpackages']['service']) {
66 65
		foreach($config['installedpackages']['service'] as $service) {
67 66
			if(strtolower($service['name']) == strtolower($name)) {
......
83 82
}
84 83

  
85 84
function stop_service($name) {
86
        global $config, $g;
85
        global $config;
87 86
        if($config['installedpackages']['service']) {
88 87
                foreach($config['installedpackages']['service'] as $service) {
89 88
                        if(strtolower($service['name']) == strtolower($name)) {
......
108 107
}
109 108

  
110 109
function restart_service($name) {
111
        global $config, $g;
110
    global $config;
112 111
	stop_service($name);
113 112
	start_service($name);
114 113
        if($config['installedpackages']['service']) {

Also available in: Unified diff