Currently the charybdis-ircd init script does not start charybdis
appropriately, due to the new executable name as of version 4.x. I
will propose a change similar to [1] but I first have a question,
because there is also another issue I have with the current package.
I believe during configuration the localstatedir should be set
to /var/lib therefore the bandb gets stored
in /var/lib/charybdis/ban.db, rather than the
current /var/charybdis/ban.db. This could potentially cause issues, but
IMO there's an issue anyway with the current path: IIRC it is not
created on package install and charybdis will fail to start without the
directory being manually created first. At least, I've heard another
Alpine user report that they had issues with the directory being
nonexistent, but I don't know if this was an error on their part or a
packaging issue. Please let me know if I'm wrong, and if I'm not,
whether setting configure flag --localstatedir=/var/lib would be a
welcomed change.
[1] Partial patch which excludes anything regarding the localstatedir:
diff --git a/main/charybdis/charybdis.initd b/main/charybdis/charybdis.initd
index bbf614de9b..30fbc12e8d 100644
--- a/main/charybdis/charybdis.initd
+++ b/main/charybdis/charybdis.initd
@@ -1,22 +1,9 @@
#!/sbin/openrc-run
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/charybdis/files/charybdis-ircd.initd,v 1.2 2008/01/08 21:17:02 jokey Exp $
+
+command="/usr/bin/charybdis"
+command_user="${CHARYBDIS_USER:-ircd}"
depend() {
- use net
- provide ircd
+ use net
+ provide ircd
}
-
-start() {
- ebegin "Starting ircd-charybdis"
- start-stop-daemon --start --quiet -u ${CHARYBDIS_USER} --exec /usr/bin/charybdis-ircd -- -configfile ${CHARYBDIS_CONF}>/dev/null
- eend $?
-}
-
-stop() {
- ebegin "Stopping ircd-charybdis"
- start-stop-daemon --stop --quiet --pidfile ${CHARYBDIS_PID}
- eend $?
-}
-
--
wowaname <https://wowana.me/pgp.xht>
On Thu, Feb 13, 2020 at 03:22:01PM +0000, opal hart wrote:
> Currently the charybdis-ircd init script does not start charybdis
> appropriately, due to the new executable name as of version 4.x. I
> will propose a change similar to [1] but I first have a question,
> because there is also another issue I have with the current package.
>
> I believe during configuration the localstatedir should be set
> to /var/lib therefore the bandb gets stored
> in /var/lib/charybdis/ban.db, rather than the
> current /var/charybdis/ban.db. This could potentially cause issues, but
> IMO there's an issue anyway with the current path: IIRC it is not
> created on package install and charybdis will fail to start without the
> directory being manually created first. At least, I've heard another
> Alpine user report that they had issues with the directory being
> nonexistent, but I don't know if this was an error on their part or a
> packaging issue. Please let me know if I'm wrong, and if I'm not,
> whether setting configure flag --localstatedir=/var/lib would be a
> welcomed change.
I think this is the correct thing to do. `/var/lib/` is meant for this
kind of data.
If it did not work in the first place, I'm not even sure some kind of
migration is necessary. In any case make sure the directory is created
now.
>
>
> [1] Partial patch which excludes anything regarding the localstatedir:
>
> diff --git a/main/charybdis/charybdis.initd b/main/charybdis/charybdis.initd
> index bbf614de9b..30fbc12e8d 100644
> --- a/main/charybdis/charybdis.initd
> +++ b/main/charybdis/charybdis.initd
> @@ -1,22 +1,9 @@
> #!/sbin/openrc-run
> -# Copyright 1999-2005 Gentoo Foundation
> -# Distributed under the terms of the GNU General Public License v2
> -# $Header: /var/cvsroot/gentoo-x86/net-irc/charybdis/files/charybdis-ircd.initd,v 1.2 2008/01/08 21:17:02 jokey Exp $
> +
> +command="/usr/bin/charybdis"
> +command_user="${CHARYBDIS_USER:-ircd}"
>
> depend() {
> - use net
> - provide ircd
> + use net
> + provide ircd
> }
> -
> -start() {
> - ebegin "Starting ircd-charybdis"
> - start-stop-daemon --start --quiet -u ${CHARYBDIS_USER} --exec /usr/bin/charybdis-ircd -- -configfile ${CHARYBDIS_CONF}>/dev/null
> - eend $?
> -}
> -
> -stop() {
> - ebegin "Stopping ircd-charybdis"
> - start-stop-daemon --stop --quiet --pidfile ${CHARYBDIS_PID}
> - eend $?
> -}
> -
This is also an imrovement, using declarative style is preferred above
imperative style initd files.
>
> --
> wowaname <https://wowana.me/pgp.xht>