# HG changeset patch # User Matti Hamalainen # Date 1568121773 -10800 # Node ID f17a1b4bc2590c30184e1fd077c3f496e5c3fd35 # Parent 00a10a891ce875e4ee2f7fdda71abd48ce601078 Improve mapsearch SysV init scripts. diff -r 00a10a891ce8 -r f17a1b4bc259 scripts/mapsearch.sysvinit --- a/scripts/mapsearch.sysvinit Tue Sep 10 16:06:59 2019 +0300 +++ b/scripts/mapsearch.sysvinit Tue Sep 10 16:22:53 2019 +0300 @@ -44,13 +44,19 @@ . /lib/lsb/init-functions +THLIBS_DIR="${MAPSEARCH_DIR}/th-libs/" update_map_data() { if test ! -d "$MAPSEARCH_DIR/.hg"; then hg clone "$MAPSEARCH_REPO" "$MAPSEARCH_DIR" + if test ! -d "$THLIBS_DIR/.hg"; then + hg clone "$THLIBS_REPO" "$THLIBS_DIR" + fi else cd "$MAPSEARCH_DIR" && hg pull && hg update + cd "$THLIBS_DIR" && hg pull && hg update + cd "$MAPSEARCH_DIR" && make "bin/mapsearch" -j4 && cp "bin/mapsearch" "$MAPSEARCH_BIN" fi } diff -r 00a10a891ce8 -r f17a1b4bc259 scripts/mapsearch.sysvinit.cfg --- a/scripts/mapsearch.sysvinit.cfg Tue Sep 10 16:06:59 2019 +0300 +++ b/scripts/mapsearch.sysvinit.cfg Tue Sep 10 16:22:53 2019 +0300 @@ -1,6 +1,11 @@ # Configuration file /etc/default/mapsearch # for Pupunen MapSearch daemon SysV init script +# Mercurial repository URLs for maputils and th-libs +MAPSEARCH_REPO="http://pupunen.net/hg/maputils" +THLIBS_REPO="https://tnsp.org/hg/th-libs" + + # Use mapsearch user and group to drop privileges to MAPSEARCH_OPTS="-U mapsearch -G mapsearch" @@ -14,8 +19,6 @@ # Cache data directory, if -U/-G is used this needs write permission for that user/group MAPSEARCH_DIR="/var/cache/mapsearch" -MAPSEARCH_REPO="http://pupunen.net/hg/maputils" - # Set world center / origin MAPSEARCH_OPTS="$MAPSEARCH_OPTS -w 8192:8192"