Not a crisis item...low priority at best.
ClamAV package installs but there is no package which handles open-rc management of the ClamAV daemon clamd.
I can find is Alpine Linux's version of the open-rc init.d file HERE (https://pkgs.alpinelinux.org/package/edge/main/x86/clamav-daemon-openrc)
Funtoo's version of the open-rc init.d is HERE (https://github.com/funtoo/nokit/blob/master/app-antivirus/clamav/files/clamd.initd-r6)
Could someone more familiar with packaging and open-rc pull this onto their plate, please?
Have you tried either of them? I could package it after our repo freeze is over, but I've never run clamav and can't really test.
[EDIT] There's also the gentoo repository (https://gitweb.gentoo.org/repo/gentoo.git/tree/app-antivirus/clamav/files) which might be of interest.
I didn't think of looking at gentoo because of their stance on systemd/open-rc being a little too tolerant. I cited the funtoo reference as project is headed by same person who started gentoo. Daniel Robbins (BDFL of gentoo/funtoo) has explicitly stated systemd will never touch funtoo. So, naturally I looked at the funtoo repositories for code for a open-rc solution. There's quite a bit of cross-over between the two projects but funtoo is focused on open-rc only. The catch being compile locally, like gentoo.
I haven't been feeling very experimental WRT testing new services. My system "feels" fragile as it is at the moment. However, missing an open-rc service for anti-virus seemed important to speak up about.
You don't have to create any packages; just copy the init script in /etc/init.d, chmod +x it, copy the conf file in /etc/conf.d and tweak them (if needed, usually, only the shebang needs to be changed to "#!/usr/bin/openrc-run") until clamav start/stops successfully. Then post them here for packaging.
I can't remember where I stole my rc script from but this is the one I use pretty successfully:
#!/bin/sh
# clamav Script to start/stop clamd.
#
# chkconfig: - 63 38
# description: clamav antivirus daemon.
#
# processname: clamd
# pidfile: /var/run/clamav/clamd.pid
#
# Source function library
#. /etc/rc.d/init.d/functions
# Get network config
#. /etc/sysconfig/network
###########################################################################
# CONFIGURATION
# Most configuration options are found in the clamd.conf file
# The location of configuration file
config=/etc/clamav/clamd.conf
# The prefix clamd was installed to
prefix=/usr/bin
###########################################################################
# SCRIPT
RETVAL=0
start() {
echo -n $"Starting Clamav: "
/usr/bin/clamd
RETVAL1=$?
echo
[ $RETVAL1 -eq 0 ] && touch /var/lock/clamd
return $RETVAL1
}
stop() {
echo -n $"Stopping Clamav: "
killall clamd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
return $RETVAL
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
# status)
# status clamd
# ;;
restart)
restart
;;
*)
# echo $"Usage: $0 {start|stop|status|restart}"
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
Hello,
I can't find a "clamav-openrc" package, only "clamav-runit" and "clamav-s6".
maybe it's missing.. (?)
many thanks if someone could add it.
Hi to all,
I had the same issue, with you.
Created an AUR package about it.
https://aur.archlinux.org/packages/clamav-openrc/
Project's page is https://gitlab.com//linuxer.gr/clamav-opernrc
Regards :)
Hi,
I had the same issue, with you.
Created an AUR package about it.
https://aur.archlinux.org/packages/clamav-openrc/
Project's page is https://gitlab.com//linuxer.gr/clamav-opernrc
Regards :)
Added to [galaxy], thanks.
I'm wondering why the package has acpid-openrc dependency?
That was my bad, it should have been
openrc as a dependency, at the time I created it on AUR.