Permalink
Browse files

Make find BSD compatible + change error about site not resolving into…

… a warning
  • Loading branch information...
amiramix committed Aug 22, 2012
1 parent 8babe0b commit 1c73c4ce71e3077888d589301dc9c6a93de95c49
Showing with 5 additions and 4 deletions.
  1. +1 −1 bin/zotonic
  2. +4 −3 src/scripts/zotonic-addsite
View
@@ -31,7 +31,7 @@ then
echo Usage: `basename $0` [command] 1>&2
echo 1>&2
echo Where [command] is one of: 1>&2
- CMDS="`find $ZOTONIC_SCRIPTS/zotonic-* -perm /a+x | sed 's/.*zotonic-//g'`"
+ CMDS="`find $ZOTONIC_SCRIPTS/zotonic-* -perm -a+x | sed 's/.*zotonic-//g'`"
echo $CMDS 1>&2
echo 1>&2
echo see doc/ZotonicCommands.txt for more info 1>&2
@@ -153,13 +153,14 @@ function check_options {
if ! ping -c 1 -q $SITE &>/dev/null; then
- echo "$SITE cannot be reached. You should add $SITE to your /etc/hosts file,"
+ echo "Warning!"
+ echo "Site: '$SITE' cannot be reached."
+ echo "Command 'host $SITE' must resolve to an IP address,"
echo "otherwise you won't be able to reach it after installing the site."
- echo "Add the following line to /etc/hosts:"
+ echo "You can fix that by adding the following line to /etc/hosts:"
echo
echo "127.0.0.1 $SITE"
echo
- exit 1
fi

0 comments on commit 1c73c4c

Please sign in to comment.