dotfiles/unprocessed/config/scripts/logstasync

7 lines
229 B
Plaintext
Raw Normal View History

2018-11-24 13:45:14 +01:00
#!/usr/bin/env bash
serv="$1"
shift
ssh "$serv" 'sudo tail --follow=name --retry --quiet $(sudo find $(echo /var/log/$([ -d /var/log/httpd/ ] && echo httpd || echo apache2)) -type f -name *access.log)' | logstalgia --sync "$@"