summaryrefslogtreecommitdiff
path: root/doc/rc.d_cccms
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
commit9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch)
tree8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /doc/rc.d_cccms
parent85a01e35274b8d4d4165a7b26bd7986e211246bb (diff)
parent1853082fcd8c067390c246f9daa01a9b47387497 (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_cccms44
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
9name="cccms"
10rcvar="cccms_enable"
11desc="CCC CMS unicorn server"
12
13cccms_dir="${cccms_dir:-/usr/local/www/cccms}"
14cccms_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"
17command="/usr/local/rvm/gems/ruby-3.2.11@rails8-upgrade/wrappers/unicorn"
18command_args="-c ${cccms_unicorn_config} -E production -D"
19cccms_chdir="${cccms_dir}"
20
21pidfile="${cccms_pidfile:-${cccms_dir}/tmp/pids/unicorn.pid}"
22procname="ruby"
23
24required_dirs="${cccms_dir}"
25
26extra_commands="reload"
27sig_reload="USR2"
28
29start_precmd="cccms_prestart"
30cccms_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
37export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
38export RAILS_ENV=production
39export HOME=/root
40
41load_rc_config "${name}"
42: ${cccms_enable:="NO"}
43
44run_rc_command "$1"