I wrote a rc.d script to handle 'thin' processes on startup, however I couldn't stop it using "/etc/rc.d/thin stop". Check /etc/rc.subr, I noticed that "find_processes" looks for something in the ps output like: 5570 0 ruby19: /usr/local/bin/thin server (0.0.0.0:80) (ruby19) whereas in my case, it is: 5570 0 ruby19: thin server (0.0.0.0:80) (ruby19) Find attached a patch that would fix the problem. For reference, here is my /etc/rc.d/thin: ----------------> #!/bin/sh # # PROVIDE: thin # REQUIRE: DAEMON # BEFORE: LOGIN . /etc/rc.subr # Defaults. thin_enable=${thin_enable:-"NO"} name=thin rcvar=thin_enable app_path=/var/www/grecLeFroc command="/usr/local/bin/${name}" command_args="start -d -c ${app_path}/current -p 80 -e production" command_interpreter="/usr/local/bin/ruby19" pidfile="${app_path}/shared/pids/${name}.pid" # Crucial (!) for execjs to find js runtime. PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin load_rc_config $name run_rc_command "$1" <----------------
Responsible Changed From-To: freebsd-bugs->freebsd-rc Over to maintainer(s).
Any idea when this might get included, its not in FreeBSD 10-RELEASE.
Heres an updated copy of the patch if that helps.
it does help.
sorry, I thought this was a port. I just realized it's a base PR.
Take.
Created attachment 182691 [details] deduplicate the procnamebn variable by moving it outside the if-then-else block I have the exact same issue with several Python programs running in the background. My patch moves the original declaration of procnamebn outside the if-then-else block to avoid duplication. Any chance this will be merged with HEAD in the very near future ? (I'm asking since this PR is quite old)
batch change of PRs untouched in 2018 marked "in progress" back to open.