1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Cleanup daemonization in rc.d script (#2409)

Pull request https://github.com/puma/puma/pull/2170/files
removed all daemonization code.
The `-d` in the rc.d scripts is a left over from this.
This is replaces by `daemon` (https://www.freebsd.org/cgi/man.cgi?query=daemon&sektion=8)
for daemonization of the process.

Signed-off-by: fliiiix <hi@l33t.name>
This commit is contained in:
Felix 2020-10-03 16:03:35 +02:00 committed by GitHub
parent bce13e5a07
commit ddbeda76b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@
* Your feature goes here <Most recent on the top, like GitHub> (#Github Number)
* Bugfixes
* Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
* Cleanup daemonization in rc.d script (#2409)
* Refactor
* Consolidate option handling in Server, Server small refactors, doc changes (#2389)

View file

@ -23,7 +23,7 @@ puma_start()
rb_ver=$(/usr/local/bin/jq -r ".servers[$i].ruby_version" /usr/local/etc/puma.conf)
case $rb_env in
"rbenv")
su - $user -c "cd $dir && rbenv shell $rb_ver && bundle exec puma -C $dir/config/puma.rb -d"
cd $dir && rbenv shell $rb_ver && /usr/sbin/daemon -u $user bundle exec puma -C $dir/config/puma.rb
;;
*)
;;
@ -48,7 +48,7 @@ puma_restart()
rb_ver=$(/usr/local/bin/jq -r ".servers[$i].ruby_version" /usr/local/etc/puma.conf)
case $rb_env in
"rbenv")
su - $user -c "cd $dir && pkill ruby && rbenv shell $ruby_version && bundle exec puma -C $dir/config/puma.rb -d"
cd $dir && rbenv shell $rb_ver && /usr/sbin/daemon -u $user bundle exec puma -C $dir/config/puma.rb
;;
*)
;;