Last active
June 11, 2019 15:40
-
-
Save johnpmitsch/2dc0dbfdf0c54a643545ac3ed2227058 to your computer and use it in GitHub Desktop.
Katello - kill rails and webpack functions
This file contains 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
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