update and rename migration script; execute migration script before loading config

Origin commit data
------------------
Commit: dceffe31f0
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-11-22 (Thu, 22 Nov 2018)

Origin message was:
------------------
- update and rename migration script; execute migration script before loading config
This commit is contained in:
vanhofen
2018-11-22 00:00:28 +01:00
parent 1e8e7dd77d
commit ffc7d99755
5 changed files with 34 additions and 21 deletions

View File

@@ -1,10 +1,8 @@
installdir = $(CONFIGDIR)
install_DATA = flash.start
#NI
install_DATA += \
ni-migration.sh \
install_DATA = \
flash.start \
migration.sh \
movieplayer.start \
movieplayer.end \
recording.start \
@@ -14,7 +12,7 @@ install_DATA += \
install-data-hook:
chmod 0755 $(DESTDIR)$(CONFIGDIR)/flash.start
chmod 0755 $(DESTDIR)$(CONFIGDIR)/ni-migration.sh
chmod 0755 $(DESTDIR)$(CONFIGDIR)/migration.sh
chmod 0755 $(DESTDIR)$(CONFIGDIR)/movieplayer.start
chmod 0755 $(DESTDIR)$(CONFIGDIR)/movieplayer.end
chmod 0755 $(DESTDIR)$(CONFIGDIR)/recording.start

View File

@@ -0,0 +1,24 @@
#!/bin/sh
cd /var/tuxbox/config
if [ -e neutrino.conf ]; then
# remove NG leftovers
sed -i 's|ng_netfs_\(.*\)|netfs_\1|' neutrino.conf
# webradio_usr.xml was moved
sed -i "s|/var/tuxbox/config/webradio_usr.xml|/var/tuxbox/webradio/webradio_usr.xml|" neutrino.conf
mkdir -p /var/tuxbox/webradio/
if [ -e /var/tuxbox/config/webradio_usr.xml -a ! -e /var/tuxbox/webradio/webradio_usr.xml ]; then
mv /var/tuxbox/config/webradio_usr.xml /var/tuxbox/webradio/
fi
# webtv_usr.xml was moved
sed -i "s|/var/tuxbox/config/webtv_usr.xml|/var/tuxbox/webtv/webtv_usr.xml|" neutrino.conf
mkdir -p /var/tuxbox/webtv/
if [ -e /var/tuxbox/config/webtv_usr.xml -a ! -e /var/tuxbox/webtv/webtv_usr.xml ]; then
mv /var/tuxbox/config/webtv_usr.xml /var/tuxbox/webtv/
fi
sort neutrino.conf > neutrino.sort
mv neutrino.sort neutrino.conf
fi

View File

@@ -1,9 +0,0 @@
#!/bin/sh
cd /var/tuxbox/config
if [ -e neutrino.conf ]; then
sed -i 's|ng_netfs_\(.*\)|netfs_\1|' neutrino.conf
sort neutrino.conf > neutrino.sort
mv neutrino.sort neutrino.conf
fi