Projet

Général

Profil

« Précédent | Suivant » 

Révision ad03afb6

Ajouté par Renato Botelho il y a presque 10 ans

Escape argument on call to is_process_running too, also remove some unecessary mwexec() calls

Voir les différences:

etc/inc/service-utils.inc
144 144

  
145 145
				if(!($service['rcfile'] or $service['stopcmd'])) {
146 146
					if(is_process_running("{$service['executable']}"))
147
						mwexec("/usr/bin/killall {$service['executable']}");
147
						killbyname($service['executable']);
148 148
					return;
149 149
				}
150 150
				break;
......
152 152
		}
153 153
	}
154 154
	/* finally if we get here lets simply kill the service name */
155
	if(is_process_running("{$name}"))
156
		mwexec("/usr/bin/killall " . escapeshellarg($name));
155
	if(is_process_running(escapeshellarg($name)))
156
		killbyname(escapeshellarg($name));
157 157
}
158 158

  
159 159
function restart_service($name) {

Formats disponibles : Unified diff