Skip to content

Instantly share code, notes, and snippets.

@dgpro
Created April 1, 2019 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgpro/138d2920b7aba59b0def6ba1d113d6fb to your computer and use it in GitHub Desktop.
Save dgpro/138d2920b7aba59b0def6ba1d113d6fb to your computer and use it in GitHub Desktop.
SSH Script to tail the latest Laravel log files on remote server
#!/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