Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #===================================================================================
- #
- # FILE: clamdctl
- #
- # USAGE: clamdctl [start|stop|restart|help] [-h|--help]
- #
- # DESCRIPTION: Startup script for clamd daemon
- # ClamAV is an open source (GPL) antivirus engine designed for
- # detecting Trojans, viruses, malware and other malicious threats.
- #
- # _____ _ _ _____ _ _____ _____
- # | __||_| _____ ___ | | ___ | _ || | ___ ___ ___ | __| | _ |
- # |__ || || || . || || -_| | __|| || .'|| | |___| |__ | _ | __|_
- # |_____||_||_|_|_|| _||_||___| |__| |_||__,||_|_| |_____||_||__| |_|
- # |_|
- #
- #===================================================================================
- #
- PATH=/usr/local/clamav/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
- export PATH
- RETVAL=0
- PROG=clamd
- DAEMON=/usr/local/sbin/clamd
- #
- function start()
- {
- echo -n $"Starting $PROG daemon ... "
- $DAEMON
- echo "done."
- }
- #
- function stop()
- {
- echo -n $"Stopping $PROG daemon ... "
- killall -TERM $PROG
- echo "done."
- }
- #
- # See how we were called.
- case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- help|-h|--help)
- $DAEMON --help
- ;;
- *)
- echo "Usage: $PROG start|stop|restart|help"
- RETVAL=2
- ;;
- esac
- #
- exit $RETVAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement