Lines 17-24
load_rc_config $name
Link Here
|
17 |
|
17 |
|
18 |
: ${forgejo_user:="%%GITUSER%%"} |
18 |
: ${forgejo_user:="%%GITUSER%%"} |
19 |
: ${forgejo_enable:="NO"} |
19 |
: ${forgejo_enable:="NO"} |
|
|
20 |
: ${forgejo_configcheck_enable:="YES"} |
20 |
: ${forgejo_facility:="daemon"} |
21 |
: ${forgejo_facility:="daemon"} |
21 |
: ${forgejo_priority:="debug"} |
22 |
: ${forgejo_priority:="info"} |
22 |
: ${forgejo_shared:="%%PREFIX%%/share/${name}"} |
23 |
: ${forgejo_shared:="%%PREFIX%%/share/${name}"} |
23 |
: ${forgejo_custom:="%%PREFIX%%/etc/${name}"} |
24 |
: ${forgejo_custom:="%%PREFIX%%/etc/${name}"} |
24 |
|
25 |
|
Lines 29-34
githome="$(eval echo ~${forgejo_user})"
Link Here
|
29 |
pidfile="/var/run/${name}.pid" |
30 |
pidfile="/var/run/${name}.pid" |
30 |
|
31 |
|
31 |
start_cmd="${name}_start" |
32 |
start_cmd="${name}_start" |
|
|
33 |
start_precmd="${name}_prestart" |
32 |
|
34 |
|
33 |
forgejo_start() { |
35 |
forgejo_start() { |
34 |
for d in /var/db/forgejo /var/log/forgejo; do |
36 |
for d in /var/db/forgejo /var/log/forgejo; do |
Lines 48-51
forgejo_start() {
Link Here
|
48 |
$command |
50 |
$command |
49 |
} |
51 |
} |
50 |
|
52 |
|
|
|
53 |
forgejo_prestart() { |
54 |
if checkyesno forgejo_configcheck_enable; then |
55 |
if su -m ${forgejo_user} -c "%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then |
56 |
else |
57 |
echo "cannot start ${name} because of configuration errors. Run" >&2 |
58 |
echo " su -m git -c '${name} doctor check'" >&2 |
59 |
echo "for further details" |
60 |
return 1 |
61 |
fi |
62 |
fi |
63 |
} |
64 |
|
51 |
run_rc_command "$1" |
65 |
run_rc_command "$1" |