Permalink
Browse files

Merge branch 'script-change' of git://github.com/SashaCrofter/cjdns

  • Loading branch information...
2 parents 1d60bc8 + 74642ac commit 464dfedbd7f8fec5f557a2b0b6280b98f8178aa2 Caleb James DeLisle committed Feb 23, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 scripts/cjdns.sh
View
@@ -46,7 +46,7 @@ if [ -z "$CONF" ]; then CONF="${CJDPATH}cjdroute.conf"; fi
# path ot the log file.
if [ -z "$LOGTO" ]; then LOGTO="/dev/null"; fi
-PID=`pidof -o %PPID $CJDNS`
+PID=$(pgrep -d " " -f "$CJDNS")
stop()
{
@@ -56,8 +56,11 @@ stop()
start()
{
- $CJDROUTE < $CONF 2>&1 >> $LOGTO &
- if [ $? -gt 0 ]; then return 1; fi
+ $CJDROUTE < $CONF &>> $LOGTO
+ if [ $? -gt 0 ]; then
+ echo "Failed to start. (CJDNS already running?)"
+ return 1
+ fi
}
status()

0 comments on commit 464dfed

Please sign in to comment.