diff options
author | Akinori Hattori <hattya@gentoo.org> | 2017-07-08 16:50:09 +0900 |
---|---|---|
committer | Akinori Hattori <hattya@gentoo.org> | 2017-07-08 16:50:09 +0900 |
commit | 6f479e1a55e376ef959b82b028339444348e79a3 (patch) | |
tree | 4eb186ab034f18c6d8ae51687e63e4a2b1e21573 /app-i18n/canna | |
parent | profiles/base: Mask media-video/parole[clutter] due to dep on old GTK+3 (diff) | |
download | gentoo-6f479e1a55e376ef959b82b028339444348e79a3.tar.gz gentoo-6f479e1a55e376ef959b82b028339444348e79a3.tar.bz2 gentoo-6f479e1a55e376ef959b82b028339444348e79a3.zip |
app-i18n/canna: update init script
Gentoo-Bug: 603702
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'app-i18n/canna')
-rw-r--r-- | app-i18n/canna/canna-3.7_p3-r1.ebuild | 4 | ||||
-rw-r--r-- | app-i18n/canna/canna-3.7_p3-r2.ebuild | 4 | ||||
-rw-r--r-- | app-i18n/canna/files/canna-3.7_p3.initd | 41 | ||||
-rw-r--r-- | app-i18n/canna/files/canna.confd (renamed from app-i18n/canna/files/canna-3.7_p3.confd) | 0 | ||||
-rw-r--r-- | app-i18n/canna/files/canna.initd | 31 |
5 files changed, 35 insertions, 45 deletions
diff --git a/app-i18n/canna/canna-3.7_p3-r1.ebuild b/app-i18n/canna/canna-3.7_p3-r1.ebuild index 2ee6f1090d11..2dac49233f0b 100644 --- a/app-i18n/canna/canna-3.7_p3-r1.ebuild +++ b/app-i18n/canna/canna-3.7_p3-r1.ebuild @@ -84,8 +84,8 @@ src_install() { # doins doc/man/guide/tex/canna.{dvi,ps,pdf} #fi - newinitd "${FILESDIR}"/${P}.initd canna || die - newconfd "${FILESDIR}"/${P}.confd canna || die + newinitd "${FILESDIR}"/${PN}.initd canna || die + newconfd "${FILESDIR}"/${PN}.confd canna || die insinto /etc/ ; newins "${FILESDIR}"/canna.hosts hosts.canna || die keepdir /var/log/canna/ || die diff --git a/app-i18n/canna/canna-3.7_p3-r2.ebuild b/app-i18n/canna/canna-3.7_p3-r2.ebuild index fb7bc1514588..6511e2168c8f 100644 --- a/app-i18n/canna/canna-3.7_p3-r2.ebuild +++ b/app-i18n/canna/canna-3.7_p3-r2.ebuild @@ -96,8 +96,8 @@ src_install() { doins doc/man/guide/tex/canna.{dvi,ps,pdf} fi - newinitd "${FILESDIR}"/${P}.initd canna || die - newconfd "${FILESDIR}"/${P}.confd canna || die + newinitd "${FILESDIR}"/${PN}.initd canna || die + newconfd "${FILESDIR}"/${PN}.confd canna || die insinto /etc/ ; newins "${FILESDIR}"/canna.hosts hosts.canna || die keepdir /var/log/canna/ || die diff --git a/app-i18n/canna/files/canna-3.7_p3.initd b/app-i18n/canna/files/canna-3.7_p3.initd deleted file mode 100644 index 9e21b061368f..000000000000 --- a/app-i18n/canna/files/canna-3.7_p3.initd +++ /dev/null @@ -1,41 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# CANNASERVER_OPTS and CANNASERVER_OWNER is defined in /etc/conf.d/canna -CANNASERVER_LOGFILE="/var/log/canna/CANNA0msgs" - -depend() { - after logger -} - -start() { - if [ -S /tmp/.iroha_unix/IROHA ] ; then - /usr/sbin/cannakill >/dev/null 2>&1 - fi - rm -f /tmp/.iroha_unix/IROHA - - if [ "${CANNASERVER_ENABLE_SYSLOG}" = "yes" ] ; then - CANNASERVER_OPTS="${CANNASERVER_OPTS} -syslog" - else - touch "${CANNASERVER_LOGFILE}" - chmod u+w "${CANNASERVER_LOGFILEj}" - fi - - if [ ! -z "${CANNASERVER_OWNER}" ] ; then - if [ -f "${CANNASERVER_LOGFILE}" ] ; then - chown "${CANNASERVER_OWNER}" "${CANNASERVER_LOGFILE}" - fi - CANNASERVER_OPTS="${CANNASERVER_OPTS} -u ${CANNASERVER_OWNER}" - fi - - ebegin "Starting canna" - /usr/sbin/cannaserver ${CANNASERVER_OPTS} - eend $? "Failed to start canna" -} - -stop() { - ebegin "Stopping canna" - /usr/sbin/cannakill - eend $? "Failed to stop canna" -} diff --git a/app-i18n/canna/files/canna-3.7_p3.confd b/app-i18n/canna/files/canna.confd index d3fdce5425a2..d3fdce5425a2 100644 --- a/app-i18n/canna/files/canna-3.7_p3.confd +++ b/app-i18n/canna/files/canna.confd diff --git a/app-i18n/canna/files/canna.initd b/app-i18n/canna/files/canna.initd new file mode 100644 index 000000000000..97dac733fa94 --- /dev/null +++ b/app-i18n/canna/files/canna.initd @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/${RC_SVCNAME}server" +command_args="${CANNASERVER_OPTS}" + +# CANNASERVER_OPTS and CANNASERVER_OWNER is defined in /etc/conf.d/canna +CANNASERVER_LOGFILE="/var/log/${RC_SVCNAME}/CANNA0msgs" + +depend() { + use logger + need net +} + +start_pre() { + if [ "${CANNASERVER_ENABLE_SYSLOG}" = "yes" ]; then + command_args="${command_args} -syslog" + elif [ -z "${CANNASERVER_OWNER}" ]; then + checkpath "${CANNASERVER_LOGFILE}" + else + checkpath -o "${CANNASERVER_OWNER}" "${CANNASERVER_LOGFILE}" + command_args="${command_args} -u ${CANNASERVER_OWNER}" + fi +} + +stop() { + ebegin "Stopping ${name:-${RC_SVCNAME}}" + /usr/sbin/${RC_SVCNAME}kill + eend ${?} +} |