#!/bin/sh

#
# Configuration reset script for spxdispmanager
#

reset() {
    # restore default configuration
    for f in /etc/spxdispmanager/config.json /etc/default/splash; do
        cp -a $f.spxsave $f
    done
    local g="$GLOBIGNORE"
    GLOBIGNORE=".." # so that * matches hidden files as well
    rm -rf -- /etc/spinetix/splash/*
    GLOBIGNORE="$g"
}

#
# Main
#

case "$1" in
    reset)
        reset
    ;;
    *)
        echo "Usage $0 {reset}" >&2
	exit 1
    ;;
esac
