Created
April 1, 2019 09:17
-
-
Save dgpro/138d2920b7aba59b0def6ba1d113d6fb to your computer and use it in GitHub Desktop.
SSH Script to tail the latest Laravel log files on remote server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# exit if any of the commands fail | |
set -e | |
source ${BASH_SOURCE[0]%/*}/ip.conf | |
today=$(date +"%Y-%m-%d") | |
echo -e "Connecting to ip:$ip"; | |
ssh root@$ip -t "tail -f --lines=100 /var/www/latest/storage/logs/laravel-$today.log" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment