Commit 2cde884d authored by sokai's avatar sokai

cosmetic clean-up (moved ATM non-functional status to EOF)

parent dda16912
......@@ -64,45 +64,6 @@ stop() {
fi
}
status() {
echo "NOT IMPLEMENTED ! check status of the Freifunk Potsdam AP database"
# echo ""
# IFS=\;\,\:
# set - $(nvram get ff_adm_latlon)
# unset IFS
# if [ -z "$1" ] || [ -z "$2" ]; then
# echo "ERROR no coordinates configured, ff_adm_latlon is empty"
# elif [ -z "$(nvram get ff_map_server)" ]; then
# echo "ERROR no map server configured, ff_map_server is empty"
# else
# echo "STATUS everything fine: ff_map_server is $(nvram get ff_map_server), coords are $1, $2"
# COORDS_ON_SERVER="$1, $2"
# UPDATERUN=`wget "$(nvram get ff_map_server)?dumpdatabase" -qO - 2> /tmp/freifunkmap_status | cut -f3 | grep "${COORDS_ON_SERVER}" | wc -l`
# CONNERROR=`cat /tmp/freifunkmap_status`
# if [ ! -z "$CONNERROR" ]; then
# echo "ERROR could not connect map server: ${CONNERROR}"
# else
# if [ ${UPDATERUN} -eq 0 ]; then
# echo "STATUS connection to map server seems to be ok, but no update run so far"
# elif [ ${UPDATERUN} -eq 1 ]; then
# echo "STATUS connection to map server seems to be ok, and your node should be visible in the map"
# else
# echo "ERROR something unexpected happend, your node should be more then one time visible in the map??? But this can't be"
# fi
# fi
# rm /tmp/freifunkmap_status
# fi
#
# CRONTABENTRY=$(grep -c "/etc/init.d/S70freifunkmap update" /var/spool/cron/crontabs/root)
# if [ $CRONTABENTRY -eq 0 ]; then
# echo "ERROR no crontab entry for freifunkmap found, the update with the server will not run, try /etc/init.d/S70freifunkmap start"
# elif [ $CRONTABENTRY -eq 1 ]; then
# echo "STATUS everything fine: found one entry for freifunkmap in the crontab"
# else [ $CRONTABENTRY -gt 1 ]
# echo "WARN found more then one entry for freifunkmap in crontab, but the update should work anyway"
# fi
}
update() {
# only one instance should be running at time
# if exists an other one kill them and all wgets
......@@ -161,3 +122,42 @@ upgrade() {
logger -t ${SCRIPTNAME} ${ERROR}
fi
}
status() {
echo "NOT IMPLEMENTED ! check status of the Freifunk Potsdam AP database"
# echo ""
# IFS=\;\,\:
# set - $(nvram get ff_adm_latlon)
# unset IFS
# if [ -z "$1" ] || [ -z "$2" ]; then
# echo "ERROR no coordinates configured, ff_adm_latlon is empty"
# elif [ -z "$(nvram get ff_map_server)" ]; then
# echo "ERROR no map server configured, ff_map_server is empty"
# else
# echo "STATUS everything fine: ff_map_server is $(nvram get ff_map_server), coords are $1, $2"
# COORDS_ON_SERVER="$1, $2"
# UPDATERUN=`wget "$(nvram get ff_map_server)?dumpdatabase" -qO - 2> /tmp/freifunkmap_status | cut -f3 | grep "${COORDS_ON_SERVER}" | wc -l`
# CONNERROR=`cat /tmp/freifunkmap_status`
# if [ ! -z "$CONNERROR" ]; then
# echo "ERROR could not connect map server: ${CONNERROR}"
# else
# if [ ${UPDATERUN} -eq 0 ]; then
# echo "STATUS connection to map server seems to be ok, but no update run so far"
# elif [ ${UPDATERUN} -eq 1 ]; then
# echo "STATUS connection to map server seems to be ok, and your node should be visible in the map"
# else
# echo "ERROR something unexpected happend, your node should be more then one time visible in the map??? But this can't be"
# fi
# fi
# rm /tmp/freifunkmap_status
# fi
#
# CRONTABENTRY=$(grep -c "/etc/init.d/S70freifunkmap update" /var/spool/cron/crontabs/root)
# if [ $CRONTABENTRY -eq 0 ]; then
# echo "ERROR no crontab entry for freifunkmap found, the update with the server will not run, try /etc/init.d/S70freifunkmap start"
# elif [ $CRONTABENTRY -eq 1 ]; then
# echo "STATUS everything fine: found one entry for freifunkmap in the crontab"
# else [ $CRONTABENTRY -gt 1 ]
# echo "WARN found more then one entry for freifunkmap in crontab, but the update should work anyway"
# fi
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment