diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
| commit | 9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch) | |
| tree | 8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /doc/rc.d_cccms | |
| parent | 85a01e35274b8d4d4165a7b26bd7986e211246bb (diff) | |
| parent | 1853082fcd8c067390c246f9daa01a9b47387497 (diff) | |
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'doc/rc.d_cccms')
| -rw-r--r-- | doc/rc.d_cccms | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/rc.d_cccms b/doc/rc.d_cccms new file mode 100644 index 0000000..678ae75 --- /dev/null +++ b/doc/rc.d_cccms | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # PROVIDE: cccms | ||
| 4 | # REQUIRE: LOGIN postgresql | ||
| 5 | # KEYWORD: shutdown | ||
| 6 | |||
| 7 | . /etc/rc.subr | ||
| 8 | |||
| 9 | name="cccms" | ||
| 10 | rcvar="cccms_enable" | ||
| 11 | desc="CCC CMS unicorn server" | ||
| 12 | |||
| 13 | cccms_dir="${cccms_dir:-/usr/local/www/cccms}" | ||
| 14 | cccms_unicorn_config="${cccms_unicorn_config:-/usr/local/etc/unicorn.rb}" | ||
| 15 | |||
| 16 | # command="/usr/local/rvm/gems/ruby-3.2.11@rails7-upgrade/wrappers/unicorn" | ||
| 17 | command="/usr/local/rvm/gems/ruby-3.2.11@rails8-upgrade/wrappers/unicorn" | ||
| 18 | command_args="-c ${cccms_unicorn_config} -E production -D" | ||
| 19 | cccms_chdir="${cccms_dir}" | ||
| 20 | |||
| 21 | pidfile="${cccms_pidfile:-${cccms_dir}/tmp/pids/unicorn.pid}" | ||
| 22 | procname="ruby" | ||
| 23 | |||
| 24 | required_dirs="${cccms_dir}" | ||
| 25 | |||
| 26 | extra_commands="reload" | ||
| 27 | sig_reload="USR2" | ||
| 28 | |||
| 29 | start_precmd="cccms_prestart" | ||
| 30 | cccms_prestart() | ||
| 31 | { | ||
| 32 | mkdir -p /usr/local/www/cccms/tmp/pids /var/log | ||
| 33 | touch /var/log/unicorn.stderr.log | ||
| 34 | chown www:www /var/log/unicorn.stderr.log | ||
| 35 | } | ||
| 36 | |||
| 37 | export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin | ||
| 38 | export RAILS_ENV=production | ||
| 39 | export HOME=/root | ||
| 40 | |||
| 41 | load_rc_config "${name}" | ||
| 42 | : ${cccms_enable:="NO"} | ||
| 43 | |||
| 44 | run_rc_command "$1" | ||
