#!/bin/sh
### BEGIN INIT INFO
# Provides:          persistence-elive
# Required-Start:    ifupdown $remote_fs $syslog
# Required-Stop:
# Should-Start:      drivers-install
# Should-Stop:
# X-Start-Before:    nis lightdm xdm gdm3 kdm ldm sdm wdm nodm entrance slim enlightenment graphical getty getty@tty1.service $x-display-manager
# X-Stop-After:      $local_fs $remote_fs udev dbus
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Configure persistence-elive
# Description:       This file should be used to construct scripts to be
#                    placed in /etc/init.d.
### END INIT INFO
# Policy Info:  http://wiki.debian.org/LSBInitScripts
# also check /etc/init.d/skeleton

# Author: Thanatermesis


# Defaults
#PIDDIR=/var/run/persistence-elive
#persistence-elivePID=$PIDDIR/persistence-elive.pid
#DESC="Configure Drivers"
SCRIPTNAME=/etc/init.d/persistence-elive
SOURCE="$0"

# enable translations
#if [[ -s "/etc/default/locale" ]] ; then
    #source /etc/default/locale
#fi
## gettext functions
#if [[ -x "/usr/bin/gettext.sh" ]] ; then
    #. gettext.sh
#else
    ## make it compatible
    #eval_gettext(){
        #echo "$@"
    #}
#fi
#TEXTDOMAIN="deliver"
#export TEXTDOMAIN

#_CMDLINE="$(cat /proc/cmdline)"

## Reads config file (will override defaults above)
#[ -r /etc/default/persistence-elive.sh ] && . /etc/default/persistence-elive.sh

#. /lib/lsb/init-functions





do_start(){
    /usr/sbin/persistence-elive "$@"
}

do_stop(){
    . /lib/lsb/init-functions
    log_daemon_msg "Saving configurations"
    /usr/sbin/persistence-elive "$@"
    log_progress_msg "done"
}

case "$1" in
    "")
        echo "Error: persistence-elive should be called with the 'start' argument." >&2
        ;;
    start)
        do_start "$@"
        ;;
    stop)
        do_stop "$@"
        ;;
    restart|reload|force-reload)
        "$0" stop
        "$0" start
        ;;
    *)
        echo "Usage: persistence-elive [start|stop]" >&2
        exit 3
        ;;
esac


# vim: set filetype=sh foldmethod=marker :
