3 # Copyright (c) 2015 Google Inc.
4 # See LICENSE for details.
6 function short_description() {
7 echo "Kill the Go 9pserver for Akaros with the specified port number"
12 echo " ${cmd} -h | --help"
13 echo " ${cmd} [ --ufs-port=<port> ]"
16 echo " -h --help Display this screen and exit"
17 echo " --ufs-port=<port> Port the ufs server is on"
18 echo " [default: 1025]"
22 # Check the sanity of our incoming variables
25 # Kill any old instances of the ufs server on ${ufs_port}
26 local ufs_pid=$(ps aux | grep "ufs" | grep "\-addr=:${ufs_port}" \
27 | head -1 | awk '{print $2}' )
28 if [ "${ufs_pid}" != "" ]; then
29 echo "Killing old 9p server instance on port=${ufs_port} (pid ${ufs_pid})"
30 echo "${ufs_pid}" | xargs kill