Mercurial > index.cgi > dotfiles
comparison .bash_aliases @ 274:02a3d7c46b2b
Better 'ds end' functionality, and ability to share a remote environment more easily
author | Steve Huston <huston@srhuston.net> |
---|---|
date | Fri, 26 Apr 2024 12:02:56 -0400 |
parents | 48b4f41712dc |
children | 2b513df62dd4 |
comparison
equal
deleted
inserted
replaced
273:61b830d34016 | 274:02a3d7c46b2b |
---|---|
56 ds() { | 56 ds() { |
57 | 57 |
58 PIDFILE=${DOTHOME}/.dotshare-PID | 58 PIDFILE=${DOTHOME}/.dotshare-PID |
59 | 59 |
60 # If we want to kill an existing server, let's do that first. | 60 # If we want to kill an existing server, let's do that first. |
61 if [ "$1" == "end" -a -e $PIDFILE ]; then | 61 if [ "$1" == "end" ]; then |
62 [[ -e $PIDFILE ]] || { | |
63 echo "No server detected" | |
64 return 1 | |
65 } | |
62 kill `cat $PIDFILE` | 66 kill `cat $PIDFILE` |
63 unset DOTSHARE_PID DOTSHARE_PORT | 67 unset DOTSHARE_PID DOTSHARE_PORT |
64 echo "Server terminated" | 68 echo "Server terminated" |
65 return 0 | 69 return 0 |
66 fi | 70 fi |