Skip to content

Commit

Permalink
Fixed problems calling upstart coomands from cron jobs with wrong PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
jacalvo committed Feb 4, 2013
1 parent 86ced79 commit 340360e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions main/core/ChangeLog
@@ -1,4 +1,5 @@
HEAD
+ Fixed problems calling upstart coomands from cron jobs with wrong PATH
+ Decode CGI unsafeParams as utf8
+ Avoid double encoding when printing JSON response in EBox::CGI::Base
+ Remove warning in EBox::Menu::Folder when currentfolder is not defined
Expand Down
10 changes: 5 additions & 5 deletions main/core/src/EBox/Service.pm
Expand Up @@ -40,14 +40,14 @@ sub manage # (daemon,action)
throw EBox::Exceptions::Internal("No such daemon: $daemon");

if ( $action eq 'start' ) {
EBox::Sudo::root("start '$daemon'");
EBox::Sudo::root("/sbin/start '$daemon'");
}
elsif ( $action eq 'stop' ) {
EBox::Sudo::root("stop '$daemon'") if (running($daemon));
EBox::Sudo::root("/sbin/stop '$daemon'") if (running($daemon));
}
elsif ( $action eq 'restart') {
EBox::Sudo::root("stop '$daemon'") if (running($daemon));
EBox::Sudo::root("start '$daemon'");
EBox::Sudo::root("/sbin/stop '$daemon'") if (running($daemon));
EBox::Sudo::root("/sbin/start '$daemon'");
}
else {
throw EBox::Exceptions::Internal("Bad argument: $action");
Expand All @@ -72,7 +72,7 @@ sub running # (daemon)
(-f "/etc/init/$daemon.conf") or
throw EBox::Exceptions::Internal("No such daemon: $daemon");

my $status = `status '$daemon'`;
my $status = `/sbin/status '$daemon'`;
# TODO: Parse different exit status:
# Pre-start
# Post-start
Expand Down

0 comments on commit 340360e

Please sign in to comment.