Start script run on FreeBSD and likely other BSDs

Fix to make start script run on FreeBSD that i used, likely applies to dragonfly, trueos and possibly netbsd- but unable to test.
This commit is contained in:
Staff Silence 2020-01-17 18:36:04 +00:00 committed by GitHub
parent 37827b6788
commit 906ce33bed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,17 +49,18 @@ USAGE
YACY_PARENT_DATA_PATH="`dirname $0`" YACY_PARENT_DATA_PATH="`dirname $0`"
cd "$YACY_PARENT_DATA_PATH" cd "$YACY_PARENT_DATA_PATH"
if [ $OS = "OpenBSD" ] || [ $OS = "Darwin" ] case "$OS" in
then *"BSD"|"Darwin")
if [ $(echo $@ | grep -o "\-\-" | wc -l) -ne 0 ] if [ $(echo $@ | grep -o "\-\-" | wc -l) -ne 0 ]
then then
echo "WARNING: Unfortunately this script does not support long options in $OS." echo "WARNING: Unfortunately this script does not support long options in $OS."
fi fi
options="`getopt hdlptsg: $*`" options="`getopt hdlptsg: $*`"
else case *)
options="`getopt -u -n YaCy -o h,d,f,l,p,t,s,g -l help,debug,foreground,logging,print-out,tail-log,startup,gui -- $@`" options="`getopt -u -n YaCy -o h,d,f,l,p,t,s,g -l help,debug,foreground,logging,print-out,tail-log,startup,gui -- $@`"
fi ;;
esac
if [ $? -ne 0 ];then if [ $? -ne 0 ];then