Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 490222 Details for
Bug 554488
net-proxy/c-icap-0.3.5 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
FILES: init script
c-icap.init.3.diff (text/plain), 2.46 KB, created by
Vieri
on 2017-08-23 12:40:48 UTC
(
hide
)
Description:
FILES: init script
Filename:
MIME Type:
Creator:
Vieri
Created:
2017-08-23 12:40:48 UTC
Size:
2.46 KB
patch
obsolete
>--- /usr/portage/net-proxy/c-icap/files/c-icap.init.3 2017-02-28 21:43:13.000000000 +0100 >+++ /usr/local/portage/net-proxy/c-icap/files/c-icap.init.3 2017-08-23 14:21:25.000000000 +0200 >@@ -1,17 +1,28 @@ > #!/sbin/openrc-run >-# Copyright 1999-2012 Gentoo Foundation >+# Copyright 1999-2017 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 > >-: ${configfile:=/etc/c-icap/c-icap.conf} >+: ${configfile:=/etc/c-icap/${SVCNAME}.conf} > > get_config() { > local value=$(awk '$1 == "'$1'" { print $2 }' ${configfile}) > echo ${value:-$2} > } > >+description="C-ICAP service" >+description_checkconfig="Check config for ${SVCNAME}" >+description_reload="Live config reload" >+description_relog="Close and re-open all log files" >+ > command="/usr/libexec/c-icap" > command_arguments="${EXTRA_OPTS} -f ${configfile}" >-pidfile=$(get_config PidFile /var/run/c-icap/c-icap.pid) >+extra_started_commands="relog reload" >+extra_commands="checkconfig" >+ >+pidfile=$(get_config PidFile /var/run/c-icap/${SVCNAME}.pid) >+cmdsocket=$(get_config CommandsSocket /var/run/c-icap/${SVCNAME}.ctl) >+ >+[[ -z "${MAXWAITONSTOP// }" ]] || stop_retry="--retry ${MAXWAITONSTOP}" > > depend() { > need localmount >@@ -19,8 +30,47 @@ > [ "$(get_config Logger file_logger)" = "sys_logger" ] && use logger > } > >-start_pre() { >- local cmdsocket=$(get_config CommandsSocket /var/run/c-icap/c-icap.ctl) >+checkpidinfo() { >+ if [ ! -e ${pidfile} ]; then >+ eerror "${SVCNAME} isn't running (${pidfile} not found)!" >+ return 1 >+ else >+ pidnum=$(cat ${pidfile}) >+ if [ ${#pidnum} -eq 0 ]; then >+ eerror "Could not determine PID of ${SVCNAME} (${pidfile} empty)! Did the service ever start?" >+ return 1 >+ fi >+ pidcheck="$(ps -eo pid | grep -c ${pidnum})" >+ if [ $((pidcheck)) -ne 1 ]; then >+ eerror "Could not determine PID of ${SVCNAME}! Did the service crash?" >+ return 1 >+ fi >+ fi >+} > >+start_pre() { > checkpath -d "$(dirname "${cmdsocket}")" "$(dirname "${pidfile}")" > } >+ >+stop() { >+ ebegin "Stopping ${SVCNAME}" >+ start-stop-daemon --stop ${stop_retry} --quiet --pidfile ${pidfile} >/dev/null 2>&1 >+ eend $? >+} >+ >+relog() { >+ checkpidinfo || return 1 >+ start_pre || return 1 >+ ebegin "Sending relog command to ${SVCNAME} via ${cmdsocket}" >+ echo -n "relog" > ${cmdsocket} >+ eend $? >+} >+ >+reload() { >+ checkpidinfo || return 1 >+ start_pre || return 1 >+ ebegin "Sending reconfigure and relog commands to ${SVCNAME} via ${cmdsocket}" >+ echo -n "reconfigure" > ${cmdsocket} >+ echo -n "relog" > ${cmdsocket} >+ eend $? >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 554488
:
407720
|
407722
|
490218
|
490220
| 490222 |
490224