service.openelec.settings: rework backup-restore systemd service

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-24 22:03:54 +02:00
parent 93ef607941
commit cb2d366a41
2 changed files with 6 additions and 4 deletions

View File

@ -29,7 +29,7 @@ if [ -e "$BACKUP_FILE" ] ; then
echo OK
echo -en "restoring.. this may take long time to complete, please wait.. "
rm -rf /storage/.xbmc &>/dev/null
rm -rf $CONFIG_CACHE &>/dev/null
rm -rf /storage/.cache &>/dev/null
rm -rf /storage/.config &>/dev/null
tar xf $BACKUP_FILE -C / &>/dev/null
rm -f $BACKUP_FILE &>/dev/null

View File

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