Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:illuusio
rkhunter
rkhunter-systemd.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rkhunter-systemd.sh of Package rkhunter
#!/bin/bash # # SPDX-License-Identifier: GPL-2.0 # # Systemd timer script for rkhunter. # Based on Lars Vogdt script for cron # PATH="/bin:/usr/bin:/usr/lib/rkhunter/scripts" RKHUNTER="/usr/bin/rkhunter" LOGFILE="/var/log/rkhunter.log" NICE="0" OPTIONS=(--no-mail-on-warning --cronjob --report-warnings-only --append-log --pkgmgr "RPM") if [ -z "${REPORT_EMAIL}" ] then REPORT_EMAIL="root" fi if [ -z "${LOGFILE}" ] then LOGFILE="/var/log/rkhunter.log" fi if [ ! -x $RKHUNTER ]; then echo "$RKHUNTER not found or not executable" >&2 exit 1 fi NAME=$(hostnamectl hostname) SUMMARY="Subject: [rkhunter] Warnings for $NAME" OUTFILE=$(mktemp /var/tmp/rkhunter-cron.XXXXXX) || exit 1 nice -n $NICE $RKHUNTER "${OPTIONS[@]}" --createlogfile "$LOGFILE" >> "$OUTFILE" if [ "$(stat -c %s "$OUTFILE")" -ne 0 ] then ( echo "To: $REPORT_EMAIL" echo "$SUMMARY" echo "" cat "$OUTFILE" ) | /usr/sbin/sendmail $REPORT_EMAIL fi rm -f "$OUTFILE" exit 0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor