view scripts/server-ctl @ 7052:4b6a6b794dfa

Fix errors in po files. Trying to get translation files in shape for translationproject.org. Not sure it wil happen but this checkin fixes errors in .po files found by msgfmt -cv. Recreated template and merged into .po files. Also adds potest to makefile targets and improves diff target. Fixes: Project-Id-Version changed to 2.3.0. I can't find doc on what this is supposed to be. I assume it is to match the .po file to the release since there are other fields for recording the last update to the translations. Language header, is often blank. Added Language-Team value where missing. Plural-Forms header for a couple of languages per: https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html Japanese still has an issue. There are plural forms defined in the file, but according to the above, there should only be one form. I don't know Japanese, so am not qualified to remove the plural forms or change the Plural-Forms header to the expected: nplurals=1; plural=0; So I have left it with: nplurals=2; plural=0;\n" Which will always choose the first plural form (index 0). Added Last-Translator, Language and Content-Transfer-Encoding for en.po.
author John Rouillard <rouilj@ieee.org>
date Sun, 20 Nov 2022 11:29:31 -0500
parents 311ad623e2d1
children
line wrap: on
line source

#!/bin/sh

#
# Configuration
#
CONFFILE="/var/roundup/server-config.ini"

# this will end up with extra space, but it should be ignored in the script
PIDFILE=`grep '^pidfile' ${CONFFILE} | awk -F = '{print $2}' `
SERVER="/usr/local/bin/roundup-server -C ${CONFFILE}"
ERROR=0
ARGV="$@"
if [ "x$ARGV" = "x" ] ; then
    ARGS="help"
fi

if [ -z "${PIDFILE}" ] ; then
    echo "pidfile option must be set in configuration file"
    exit 1
fi

for ARG in $@ $ARGS
do
    # check for pidfile
    if [ -f $PIDFILE ] ; then
	PID=`cat $PIDFILE`
	if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then
	    STATUS="roundup-server (pid $PID) running"
	    RUNNING=1
	else
	    STATUS="roundup-server (pid $PID?) not running"
	    RUNNING=0
	fi
    else
	STATUS="roundup-server (no pid file) not running"
	RUNNING=0
    fi

    case $ARG in
    start)
	if [ $RUNNING -eq 1 ] ; then
	    echo "$0 $ARG: roundup-server (pid $PID) already running"
	    continue
	fi
	if $SERVER ; then
	    echo "$0 $ARG: roundup-server started"
	else
	    echo "$0 $ARG: roundup-server could not be started"
	    ERROR=1
	fi
	;;
    condstart)
	if [ $RUNNING -eq 1 ] ; then
	    continue
	fi
	if $SERVER ; then
	    echo "$0 $ARG: roundup-server started"
	else
	    echo "$0 $ARG: roundup-server could not be started"
	    ERROR=1
	fi
	;;
    stop)
	if [ $RUNNING -eq 0 ] ; then
	    echo "$0 $ARG: $STATUS"
	    continue
	fi
	if kill $PID ; then
	    echo "$0 $ARG: roundup-server stopped"
	else
	    echo "$0 $ARG: roundup-server could not be stopped"
	    ERROR=2
	fi
	;;
    status)
	echo $STATUS
	;;
    *)
	echo "usage: $0 (start|condstart|stop|status)"
	cat <<EOF

    start      - start roundup-server
    condstart  - start roundup-server if it's not running
    stop       - stop roundup-server
    status     - display roundup-server status

EOF
	ERROR=3
    ;;

    esac

done

exit $ERROR


Roundup Issue Tracker: http://roundup-tracker.org/