summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--clamfs.rc.d51
-rw-r--r--clamfs.service9
4 files changed, 16 insertions, 56 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fb2c7cbb1e3..b1b1620fd13 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,3 +1,5 @@
+# Generated by mksrcinfo v8
+# Wed Mar 2 14:18:39 UTC 2016
pkgbase = clamfs
pkgdesc = A user-space anti-virus protected file system
pkgver = 1.0.1
@@ -15,10 +17,10 @@ pkgbase = clamfs
backup = etc/clamav/clamfs.xml
source = http://downloads.sourceforge.net/clamfs/clamfs-1.0.1.tar.gz
source = scancache.cxx.patch
- source = clamfs.rc.d
+ source = clamfs.service
md5sums = e1528c48d3b2340b6c3ee83cfb427820
md5sums = a672569c2caab2cc855cc7df1c9536d8
- md5sums = 4fd3f09866fb4bd20098f1da5d011a42
+ md5sums = 04c1ffa3c132ccfddc2d83c43c4f4bd7
pkgname = clamfs
diff --git a/PKGBUILD b/PKGBUILD
index 2a369d43427..e79f61203b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,10 +11,10 @@ makedepends=('boost>=1.33')
backup=('etc/clamav/clamfs.xml')
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
"scancache.cxx.patch"
- "clamfs.rc.d")
+ "clamfs.service")
md5sums=('e1528c48d3b2340b6c3ee83cfb427820'
'a672569c2caab2cc855cc7df1c9536d8'
- '4fd3f09866fb4bd20098f1da5d011a42')
+ '04c1ffa3c132ccfddc2d83c43c4f4bd7')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -37,7 +37,7 @@ package() {
sed -i -e 's#clamd socket="/var/run/clamav/clamd.ctl"#clamd socket="/var/lib/clamav/clamd.sock"#g' \
"${pkgdir}/etc/clamav/clamfs.xml"
# install startup script
- install -D -m755 "${srcdir}/clamfs.rc.d" "${pkgdir}/etc/rc.d/clamfs"
+ install -D -m644 "${srcdir}/clamfs.service" "${pkgdir}/usr/lib/systemd/system/clamfs.service"
}
# vim:set ts=2 sw=2 et:
diff --git a/clamfs.rc.d b/clamfs.rc.d
deleted file mode 100644
index f5853c64ca6..00000000000
--- a/clamfs.rc.d
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-PID=`pidof -o %PPID /usr/bin/clamfs`
-
-case "$1" in
- start)
- # if clamd isn't started first, notifyclamd fails at times
- stat_busy "Starting ClamFS"
- [ -z "$PID" ] && /usr/bin/clamfs /etc/clamav/clamfs.xml > /dev/null
-
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon clamfs
- stat_done
- fi
- ;;
-
- stop)
- stat_busy "Stopping ClamFS"
- [ -n "$PID" ] && kill $PID &> /dev/null
-
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon clamfs
- stat_done
- fi
- ;;
-
- restart)
- $0 stop
- sleep 3
- $0 start
- ;;
-
- status)
- stat_busy "Checking ClamFS status";
- ck_status clamfs
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart|status}"
-esac
-
-exit 0
-
-# vim:set ts=2 sw=2 et:
diff --git a/clamfs.service b/clamfs.service
new file mode 100644
index 00000000000..402c61e9eff
--- /dev/null
+++ b/clamfs.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=ClamFS
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/clamfs /etc/clamav/clamfs.xml
+
+[Install]
+WantedBy=multi-user.target