#!/bin/sh /etc/rc.common # This file is part of the Doodle3D project (http://doodle3d.com). # # Copyright (c) 2013, Doodle3D # This software is licensed under the terms of the GNU GPL v2 or later. # See file LICENSE.txt or visit http://www.gnu.org/licenses/gpl.html for full license details. # start after networking #START=22 START=61 LOGGER="logger -t autowifi -p 6" boot() { sleep 5 $LOGGER "Invoking Doodle3D WiFi box network auto-initialization..." /usr/share/lua/wifibox/script/d3dapi autowifi $LOGGER "Start signing in..." /usr/share/lua/wifibox/script/signin.sh > /dev/null 2> /dev/null & mkdir -p /var/lib # required by logrotate for logrotate.status mkdir -p /tmp/wifibox-rotated # this is where rotated wifibox logs are placed } start() { ps | awk '{print $5}' | grep '{signin.sh}' if [ $? -eq 1 ]; then $LOGGER "Start signing in..." /usr/share/lua/wifibox/script/signin.sh > /dev/null 2> /dev/null & fi } stop() { $LOGGER "Stop signing in..." killall signin.sh }