Skip to content

Commit

Permalink
Improve restarting of services
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Moravec committed May 30, 2014
1 parent fe5b7f7 commit 61fc77d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions library/systemd/src/modules/systemd_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,16 @@ def stop
end

def restart
stop
# Delegate to SystemdUnit#restart if not within installation
return super unless installation_system?

# Return false if service was not stopped succesffuly
return false unless stop

sleep(1)
start

# Return false if service was not started succesffuly
return false unless start
end

private
Expand Down

0 comments on commit 61fc77d

Please sign in to comment.