Last active
December 8, 2021 15:41
-
-
Save shuuuuun/f6a57c3994f3064c5c74ed886e6a0c5b to your computer and use it in GitHub Desktop.
[pumactl.rb]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
APP_ROOT = File.expand_path "#{File.dirname(__FILE__)}/.." | |
pid_file = "#{APP_ROOT}/tmp/pids/app.pid" | |
if File.exist?(pid_file) | |
puts 'Found puma pid file!' | |
puts 'Puma may have been already started!' | |
exit | |
end | |
exec("#{APP_ROOT}/bin/bundle exec puma -C #{APP_ROOT}/config/puma.rb -d") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
APP_ROOT = File.expand_path "#{File.dirname(__FILE__)}/.." | |
pid_file = "#{APP_ROOT}/tmp/pids/app.pid" | |
unless File.exist?(pid_file) | |
puts 'Not found puma pid file!' | |
exit | |
end | |
exec("kill -QUIT `cat #{pid_file}`") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment