summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schlich <wschlich@gentoo.org>2013-08-22 07:45:52 +0200
committerWolfram Schlich <wschlich@gentoo.org>2013-08-22 07:45:52 +0200
commit2c8d064b367a44723b9b557fb1edca59387edf49 (patch)
tree762432f58f66cfa663464bd506f40bd73a8a812d /app-antivirus/antivir-savapi/files/3.0.4_p32/antivir-savapi.initd
parentinitial setup (diff)
downloadwschlich-2c8d064b367a44723b9b557fb1edca59387edf49.tar.gz
wschlich-2c8d064b367a44723b9b557fb1edca59387edf49.tar.bz2
wschlich-2c8d064b367a44723b9b557fb1edca59387edf49.zip
added all ebuilds from my old svn repository
Diffstat (limited to 'app-antivirus/antivir-savapi/files/3.0.4_p32/antivir-savapi.initd')
-rwxr-xr-xapp-antivirus/antivir-savapi/files/3.0.4_p32/antivir-savapi.initd59
1 files changed, 59 insertions, 0 deletions
diff --git a/app-antivirus/antivir-savapi/files/3.0.4_p32/antivir-savapi.initd b/app-antivirus/antivir-savapi/files/3.0.4_p32/antivir-savapi.initd
new file mode 100755
index 0000000..ca475d6
--- /dev/null
+++ b/app-antivirus/antivir-savapi/files/3.0.4_p32/antivir-savapi.initd
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+
+svc_name="AntiVir SAVAPI"
+
+## required binaries
+antivir_savapi_bin="/usr/lib/AntiVir/savapi"
+
+## required config files
+antivir_savapi_cfg="/etc/antivir-savapi.conf"
+
+opts="${opts} reload"
+
+depend() {
+ need net
+ use logger dns
+}
+
+checkconfig() {
+ if [ ! -x "${antivir_savapi_bin}" ]; then
+ eerror "SAVAPI binary [${antivir_savapi_bin}] missing"
+ return 1
+ fi
+ if [ ! -r "${antivir_savapi_cfg}" ]; then
+ eerror "SAVAPI config [${antivir_savapi_cfg}] missing"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${svc_name}"
+ "${antivir_savapi_bin}" --config="${antivir_savapi_cfg}" \
+ --allow-remote-shutdown &>/dev/null
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Stopping ${svc_name}"
+ "${antivir_savapi_bin}" --config="${antivir_savapi_cfg}" \
+ --stop &>/dev/null
+ eend $?
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading ${svc_name}"
+ "${antivir_savapi_bin}" --config="${antivir_savapi_cfg}" \
+ --reload-engine --allow-remote-shutdown &>/dev/null
+ eend $?
+}
+
+status() {
+ checkconfig || return 1
+ ebegin "Checking status of ${svc_name}"
+ "${antivir_savapi_bin}" --config="${antivir_savapi_cfg}" \
+ --status &>/dev/null
+ eend $?
+}