Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- func_logger () {
- # Uso:
- # func_logger "severity" "mark" "message"
- local sty="$1"
- local mrk="$2"
- local msg="$3"
- logger -t "$mrk" -p user.$sty "$msg" || exit 1
- }
- func_logger info "Backup" "Inicia"
- rsync -av /var/www /tmp/backup || func_logger err "Backup" "terminado con exit $?"
- func_logger info "Backup" "Finalizado"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement