service.openelec.settings: port backup restore script to systemd

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-24 00:17:09 +02:00
parent 4f6e36aa42
commit 6e8bfe4415
3 changed files with 19 additions and 3 deletions

View File

@ -24,3 +24,8 @@
mkdir -p $INSTALL/usr/share/xbmc/addons/service.openelec.settings
cp -R $PKG_BUILD/* $INSTALL/usr/share/xbmc/addons/service.openelec.settings
mkdir -p $INSTALL/usr/lib/openelec
cp $PKG_DIR/scripts/* $INSTALL/usr/lib/openelec
enable_service backup-restore.service

View File

@ -1,3 +1,4 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
@ -17,9 +18,6 @@
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# restore
#
# runlevels: openelec
BACKUP_FILE=`ls -1 /storage/.restore/??????????????.tar 2>/dev/null | tail -1`

View File

@ -0,0 +1,13 @@
[Unit]
Description=Restoring Backup
DefaultDependencies=false
After=storage.mount show-version.service
Before=local-fs-pre.target swap.target
[Service]
Type=oneshot
ExecStart=/usr/lib/openelec/backup-restore
StandardOutput=tty
[Install]
WantedBy=basic.target