set PATH to make sure find all commands when execute script from crontab
This commit is contained in:
parent
d6900f9e35
commit
56646e8083
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# uncomment when use script from cron
|
||||
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
|
||||
# variables
|
||||
LOGFILE="$(hostname)_chkrootkit-$(date +'%Y-%m-%d').txt";
|
||||
GOTIFY_MESSAGE="Scan init: **"`date +"%d/%m/%Y %H:%M:%S"`"** \r"
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# uncomment when use script from cron
|
||||
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
|
||||
# variables
|
||||
LOGFILE="$(hostname)_clamav-$(date +'%Y-%m-%d').log";
|
||||
GOTIFY_MESSAGE="Scan init: **"`date +"%d/%m/%Y %H:%M:%S"`"** \r"
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# uncomment when use script from cron
|
||||
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
|
||||
# variables
|
||||
LOGFILE="$(hostname)_rkhunter-$(date +'%Y-%m-%d').log";
|
||||
GOTIFY_MESSAGE="Scan init: **"`date +"%d/%m/%Y %H:%M:%S"`"** \r"
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# uncomment when use script from cron
|
||||
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
|
||||
#verify run as root or sudo
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
#Use ./gotifypush <title> <message> <priority> <token> <clickurl>
|
||||
|
||||
# uncomment when use script from cron
|
||||
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
|
||||
# Gotify notification parameters
|
||||
TITLE=$1
|
||||
MESSAGE=$2
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
#Use ./logger.sh <logfile> <relativepath>
|
||||
|
||||
# uncomment when use script from cron
|
||||
PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
|
||||
|
||||
# variables
|
||||
REMOTE_PATH="$ES7_LOGS_PATH$2"
|
||||
PUBLIC_LOG_URL="$ES7_LOGS_URL/$2"
|
||||
|
|
Loading…
Reference in New Issue