You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've never written Ruby before, today was the first time, so if this is a dumb fix.. feel free to laugh, but let me know how to do better, but this fixed it. Let me know if you have any questions.
Lines 55-61, 65-69 are new, and modified line 73.
52 # Accepts `skip_nginx` as an option
53 add_skip_nginx_support
54
55 # Get the username provided by -u
56 username = ""
57 for i in 0 ... ARGV.length
58 if (ARGV[i] == "-u" || ARGV[i] == "--user") && ARGV[i+1]
59 username=ARGV[i+1]
60 end
61 end
62
63 # Find users with PUNs that have no active sessions and kill the process
64 add_hook :delete_puns_of_users_with_no_sessions do
65 # Check to see if username was actually provided
66 if user && username == ""
67 puts "No username was given."
68 exit
69 end
70
71 NginxStage.active_users.each do |u|
72 begin
73 next if (user && username != u.name)
74 pid_path = PidFile.new NginxStage.pun_pid_path(user: u)
75 socket = SocketFile.new NginxStage.pun_socket_path(user: u)
The text was updated successfully, but these errors were encountered:
@brandon-biggs A proposed fix has been added to #486. The original change was flawed in the comparison being made and the way the argument was defined was also wrong.
I've never written Ruby before, today was the first time, so if this is a dumb fix.. feel free to laugh, but let me know how to do better, but this fixed it. Let me know if you have any questions.
Lines 55-61, 65-69 are new, and modified line 73.
The text was updated successfully, but these errors were encountered: