Skip to content

Commit

Permalink
Merge pull request #486 from OSC/fix-nginx_stage-user
Browse files Browse the repository at this point in the history
Fix nginx_clean --user flag
  • Loading branch information
ericfranz authored Apr 30, 2020
2 parents 26620e9 + ca82549 commit cc88e23
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class NginxCleanGenerator < Generator

add_option :user do
{
opt_args: ["-u", "--user", "# Operate on specific user", "# Default: nil (all users)"],
opt_args: ["-u", "--user=USER", "# Operate on specific user", "# Default: nil (all users)"],
default: nil,
}
end
Expand All @@ -56,7 +56,7 @@ class NginxCleanGenerator < Generator
add_hook :delete_puns_of_users_with_no_sessions do
NginxStage.active_users.each do |u|
begin
next if (user && user != u)
next if (user && user != u.to_s)
pid_path = PidFile.new NginxStage.pun_pid_path(user: u)
socket = SocketFile.new NginxStage.pun_socket_path(user: u)
cleanup_stale_files(pid_path, socket) unless pid_path.running_process?
Expand Down

0 comments on commit cc88e23

Please sign in to comment.