smeserver-geneweb/root/usr/lib/systemd/systemd-gwsetup

33 lines
791 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# gwsetup: Starts the genealogy Server
# description: Starts and stops the genealogy adminstration Service
#
GWLANG=$(/sbin/e-smith/db configuration getprop sysconfig Language | sed -e 's/_.*$//')
BD=$(/sbin/e-smith/db configuration getprop geneweb DBDir || echo "/opt/geneweb/bases")
TcpPort=$(/sbin/e-smith/db configuration getprop gwsetup TcpPort)
HD="/opt/geneweb/gw/gw"
BIN=$HD/gwsetup
LOGF="/var/log/gwsetup.log"
start() {
echo -n "Starting gwsetup Services (gwsetup):"
$BIN -daemon -gd $HD -bindir $HD -p $TcpPort -lang $GWLANG
/bin/su -s /bin/bash geneweb -c "$BIN -daemon -gd $HD -bindir $HD -p $TcpPort -lang $GWLANG >>$LOGF 2>>\&1"
}
cd $BD
case "$1" in
start)
$1
;;
*)
echo "*** Usage: gwsetup {start}"
exit 1
esac
exit 0