Skip to content

Commit

Permalink
don't start service unless RUN_NOW is true
Browse files Browse the repository at this point in the history
  • Loading branch information
timwr committed Sep 25, 2020
1 parent 62481f0 commit 72111a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/post/windows/manage/persistence_exe.rb
Expand Up @@ -157,7 +157,7 @@ def install_as_service(script_on_target)
end

# if service is stopped, then start it.
service_start(nam) if service_status(nam)[:state] == 1
service_start(nam) if datastore['RUN_NOW'] and service_status(nam)[:state] == 1

@clean_up_rc << "execute -H -f sc -a \"delete #{nam}\"\n"
else
Expand Down

0 comments on commit 72111a9

Please sign in to comment.