It's so annoying when it comes to debug the run time logs of SFS2X server which is residing on Amazon EC2 instance , we have to go to LogViewer of admin panel and then keep on pressing load that too 500 messages its good if its not logging at runtime.
So to just get rid of that I have made bash script (GitHub link is provided at the end ) which may help you guy's too.
Here's the code
So to just get rid of that I have made bash script (GitHub link is provided at the end ) which may help you guy's too.
Here's the code
#!/bin/sh
file=../keys/xxxxx.pem
if [ -f "$file" ];
then
echo "$file found."
chmod 400 $file
echo "Connecting to remote server…"
ssh -i $file ec2-user@xx.xx.xx.xx "tail -f /home/ec2-user/Smartfox/SmartFoxServer_2X/SFS2X/logs/smartfox.log"
else
echo "$file not found."
fi