Skip to content

Instantly share code, notes, and snippets.

@johnpmitsch
Last active June 11, 2019 15:40
Show Gist options
  • Save johnpmitsch/2dc0dbfdf0c54a643545ac3ed2227058 to your computer and use it in GitHub Desktop.
Save johnpmitsch/2dc0dbfdf0c54a643545ac3ed2227058 to your computer and use it in GitHub Desktop.
Katello - kill rails and webpack functions
function kill_servers {
# kill node server
kill -9 $(ss -tulpn | grep 3808 | awk '{ print $7}' | awk -F'[=|,]' '{ print $3 }') 2> /dev/null
#kill rails server
if [ -f /home/vagrant/foreman/tmp/pids/server.pid ]; then
kill -9 $(cat /home/vagrant/foreman/tmp/pids/server.pid)
fi
}
function start_server {
kill_servers
cd ~/foreman
bundle exec ./script/foreman-start-dev
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment