summaryrefslogtreecommitdiff
path: root/net-irc/irker/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
commit7218e1b46bceac05841e90472501742d905fb3fc (patch)
tree56fae051db521b8fce8014cbc8b11484885b14b3 /net-irc/irker/files
parent6d691ad5b6239929063441bbd14c489e92e7396e (diff)
gentoo resync : 12.03.2021
Diffstat (limited to 'net-irc/irker/files')
-rw-r--r--net-irc/irker/files/irkerd.confd4
-rw-r--r--net-irc/irker/files/irkerd.initd31
2 files changed, 15 insertions, 20 deletions
diff --git a/net-irc/irker/files/irkerd.confd b/net-irc/irker/files/irkerd.confd
index 42ae7323612a..9b74518472c4 100644
--- a/net-irc/irker/files/irkerd.confd
+++ b/net-irc/irker/files/irkerd.confd
@@ -12,8 +12,8 @@
# Debug Level (critical, error, warning, info, debug)
# IRKERD_LOGLEVEL=""
-# To run an anonymous irkerd safely. It should not be able
-# to write to anywhere on your system
+# To run an anonymous irkerd safely. It should not be able to write to anywhere
+# on your system. If the user is undefined or empty, it defaults to "nobody".
# IRKERD_USER=""
# see man pages for irkerd for valid cmdline options
diff --git a/net-irc/irker/files/irkerd.initd b/net-irc/irker/files/irkerd.initd
index 6417d45ebf8e..cd4d1012e80c 100644
--- a/net-irc/irker/files/irkerd.initd
+++ b/net-irc/irker/files/irkerd.initd
@@ -1,33 +1,28 @@
#!/sbin/openrc-run
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-: ${pidfile:=/run/${RC_SVCNAME}.pid}
-
-: ${IRKERD_NICK:=}
-: ${IRKERD_PASSWORD:=}
-: ${IRKERD_USER:=nobody}
+: "${pidfile:=/run/${RC_SVCNAME}.pid}"
+: "${IRKERD_USER:=nobody}"
depend() {
use net
}
-start () {
- if [[ ${IRKERD_LOGFILE} ]] ; then
+start() (
+ if [ -n "${IRKERD_LOGFILE}" ] ; then
checkpath -f \
-o "${IRKERD_USER}" \
"${IRKERD_LOGFILE}" \
|| return 1
fi
- if [[ -z "${IRKERD_USER}" ]] ; then
- die "IRKERD_USER is mandatory"
- fi
-
- [[ -n "${IRKERD_LOGLEVEL}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
- [[ -n "${IRKERD_LOGFILE}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -l ${IRKERD_LOGFILE}"
- [[ -n "${IRKERD_NICK}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -n ${IRKERD_NICK}"
- [[ -n "${IRKERD_PASSWORD}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -p ${IRKERD_PASSWORD}"
+ set -f
+ set -- ${IRKERD_OPTS}
+ [ -n "${IRKERD_LOGLEVEL}" ] && set -- "$@" -d "${IRKERD_LOGLEVEL}"
+ [ -n "${IRKERD_LOGFILE}" ] && set -- "$@" -l "${IRKERD_LOGFILE}"
+ [ -n "${IRKERD_NICK}" ] && set -- "$@" -n "${IRKERD_NICK}"
+ [ -n "${IRKERD_PASSWORD}" ] && set -- "$@" -p "${IRKERD_PASSWORD}"
ebegin "Starting ${RC_SVCNAME}"
start-stop-daemon --start \
@@ -35,6 +30,6 @@ start () {
--user "${IRKERD_USER}" \
--make-pidfile --pidfile "${pidfile}" \
--exec /usr/bin/irkerd \
- -- ${IRKERD_OPTS} < /dev/null
+ -- "$@" < /dev/null
eend $?
-}
+)