16 lines
492 B
Bash
Executable File
16 lines
492 B
Bash
Executable File
#!/bin/bash
|
|
# script pour rediriger la sortie standard/erreur dans les logs
|
|
|
|
OPT=$1
|
|
|
|
if [ "$OPT" = "pre" ]; then
|
|
/usr/share/eole/schedule/schedule bareos $OPT # faire apparaitre les run-parts dans le rapport de sauvegarde, ne pas rediriger >> /var/log/schedule.log 2>&1
|
|
exit $?
|
|
elif [ "$OPT" = "post" ]; then
|
|
echo "/usr/share/eole/schedule/schedule bareos $OPT >> /var/lib/eole/reports/rapport-bareos.txt 2>&1" | at now
|
|
exit $?
|
|
else
|
|
echo Usage : $0 pre/post
|
|
exit 1
|
|
fi
|