Hallo Maik, hallo alle Anderen wissenden!
ich versuche den oben genannten Prozess umzusetzen, komme aber auch nach langen Recherchen und Manpages lesen nicht weiter.
Wenn ich mich per SSH aus dem Server anmelde funktioniert
Aber wenn ich in die "crontab" per root den oben von Maik eintrage :
| #
30 19 * * * export tmp=$(date +"%Y-%m-%d") && logwatch --detail low --range today --format text --filename /tmp/$tmp.txt && curl -ku sonja:MeinPassword -T /tmp/$tmp.txt https://192.168.xxx.xx/owncloud/remote.php/webdav/documents/Logwatch/
#
|
dann bekomme ich diese Fehlermeldung per Mail:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 | From root@owncloud1 Mon Jun 29 19:30:01 2015
Return-path: <root@owncloud1>
Envelope-to: root@owncloud1
Delivery-date: Mon, 29 Jun 2015 19:30:01 +0200
Received: from root by owncloud1 with local (Exim 4.82)
(envelope-from <root@owncloud1>)
id 1Y8fLR-0000aD-PV
for root@owncloud1; Mon, 29 Jun 2015 19:30:01 +0200
From: root@owncloud1 (Cron Daemon)
To: root@owncloud1
Subject: Cron <root@owncloud1> export tmp=$(date +"%Y-%m-%d") && logwatch --detail low --range today --format text --filename /tmp/$tmp.txt && curl -ku sonja:MeinPassword -T /tmp/$tmp.txt https://192.168.xxx.xx/owncloud/remote.php/webdav/documents/Logwatch/
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
Message-Id: <E1Y8fLR-0000aD-PV@owncloud1>
Date: Mon, 29 Jun 2015 19:30:01 +0200
/bin/sh: 1: logwatch: not found
|
logwatch ist aber installiert und funktioniert, wohl nur aus der crontab nicht
Passwort
IP-Adresse verfremdet