#!/bin/bash

set -e

STATEDIR="/etc/network/run/ifupdown-scripts-zg2"

### BEGIN INIT INFO
# Provides:          ifupdown-scripts-zg2
# Required-Start:    checkroot
# Required-Stop:     
# X-Start-Before:    ifupdown networking
# Default-Start:     S
# Default-Stop:      
# Short-Description: clean ifupdown-scripts-zg2 state files
### END INIT INFO

if [ -r "/lib/lsb/init-functions" ]; then
  . /lib/lsb/init-functions
else
  echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed"
  exit 1
fi

case "$1" in
	start|restart)
		if [ -e $STATEDIR ]; then
			log_begin_msg -n "Cleaning: $STATEDIR"
			rm -f $STATEDIR/*
			log_end_msg 0
		fi
		;;
	stop|reload|force-reload)
		;;
esac
