Skip to content

Commit

Permalink
Remove the Pidfile before starting the server process
Browse files Browse the repository at this point in the history
  • Loading branch information
ajay-vel committed Feb 16, 2022
1 parent 88507f0 commit 011ad2c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/conjur-cli/commands/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def call
create_account
load_bootstrap_policy

# Clean up the Pidfile
cleanup_pidfile

# Start the Conjur API and service
# processes
fork_server_process
Expand Down Expand Up @@ -85,6 +88,16 @@ def load_bootstrap_policy
) || exit(($CHILD_STATUS.exitstatus))
end

def cleanup_pidfile
Process.fork do
puts("Cleaning up the pidfile")

exec("
rm -f /opt/conjur-server/tmp/pids/server.pid
")
end
end

def fork_server_process
Process.fork do
puts("Conjur v#{conjur_version} starting up...")
Expand Down

0 comments on commit 011ad2c

Please sign in to comment.