#!/bin/bash

if [ $# -lt 4 ] ; then 
    echo "script called with too less parameters"
    exit 3
fi

if [ "$1" == "store" ] ; then
    /var/www/da.op3n/gameserver/service-scripts/kernel/kernel_flag_client -h "$2" -s -f "$4" -l 32
    exit $?
elif [ "$1" == "retrieve" ] ; then 
    /var/www/da.op3n/gameserver/service-scripts/kernel/kernel_flag_client -h "$2" -g -f "$4" -l 32
    exit $?
else 
    exit 3
fi
