Notes |
|
(0001146)
|
user2
|
2014-02-20 08:04
|
|
I think this was already done... checking. |
|
|
(0001147)
|
user2
|
2014-02-20 08:06
|
|
The start/stop daemon widget behaves this way - 0001239 The Daemon API should stay as-is, but perhaps the "Services" app needs to be changed? |
|
|
|
Running app-base-1.5.23-1
No mention of stopping service first in the 'set_running_state' function:
public function set_running_state($state)
{
clearos_profile(__METHOD__, __LINE__);
Validation_Exception::is_valid($this->validate_state($state));
if (! $this->is_installed())
throw new Engine_Exception(lang('base_not_installed'));
$is_running = $this->get_running_state();
if ($is_running && $state) {
// issued start on already running daemon
return;
} else if (!$is_running && !$state) {
// issued stop on already stopped daemon
return;
}
$args = ($state) ? 'start' : 'stop';
$options['stdin'] = "use_popen";
$shell = new Shell();
$shell->execute(self::COMMAND_SERVICE, "$this->initscript $args", TRUE, $options);
} |
|
|
|
Ah...in the controller...I see.
Hmmm...wonder why it did not work.
I was starting Ipsec from the Dynamic VPN page.
<lightbulb>This was trying to start the vpnwatch daemon, not IPsec</lightbulb>
Sorry!
Hmm...wonder why vpnwatchd wasn't starting ;-) |
|
|
(0001150)
|
user2
|
2014-02-20 08:42
|
|
The change in 0001239 is done in the widget/controller (controllers/daemon.php), so apps using that standard stop/start button in webconfig should already be doing a "stop" before a start. Perhaps that's broken?
The set_running_state() method should behave the same way as the system IMHO. I have no objection with adding a flag to that method though. |
|