Commit b2d6febb authored by Michael Baudino's avatar Michael Baudino Committed by OyyoDams

Remove old web manager

This commit removes the Buildroot package for the legacy web manager. It
is not used on any board anymore.

It also adds a migration to bump webmanager from 1 to 2 in users
existing `recalbox.conf`.

Finally, it adds a warning in the logs when a user somehow manages to
try to start webmanager v1.
Signed-off-by: Michael Baudino's avatarMichael Baudino <michael.baudino@alpine-lab.com>
parent 9050f2f4
......@@ -38,7 +38,7 @@ declare -A renamedCores
renamedCores=([catsfc]=snes9x2005 [pocketsnes]=snes9x2002 [snes9x_next]=snes9x2010 [pce]=mednafen_pce_fast [vb]=mednafen_vb [imame]=mame2000 [mame078]=mame2003 [fba]=fbalpha)
for oldCoreName in ${!renamedCores[@]}; do
sed -i "s/\.core=${oldCoreName}\s*$/.core=${renamedCores[${oldCoreName}]}/" $_SHARE/${recalboxConfPath} \
&& recallog "RENAMED '${oldCoreName}' core to '${renamedCores[${oldCoreName}]}' in ${tmpFile}." \
&& recallog "RENAMED '${oldCoreName}' core to '${renamedCores[${oldCoreName}]}' in $_SHARE/${recalboxConfPath}." \
|| { recallog "ERROR: couldn't replace '${oldCoreName}' by '${renamedCores[${oldCoreName}]}' in $_SHARE/${recalboxConfPath}."; exit 1; }
done
......@@ -76,3 +76,13 @@ if ! xmllint --noout --relaxng /recalbox/scripts/es_input.rng $_SHARE/${esInputC
&& recallog "RETIRED invalid or obsolete 'es_input.cfg' to $_SHARE/${esInputCfgPath}.invalid. Default one is now used instead." \
|| { recallog "ERROR: failed to retire invalid 'es_input.cfg' file."; exit 1; }
fi
### Migration 4 [20190422170104]
# Force use of webmanager v2, if v1 is configured
sed -i \
-e 's/## 1 or 2, depending on the manager version you wish/## Currently, only version 2 is available/g' \
-e 's/system.manager.version=1\s*$/system.manager.version=2/g' \
$_SHARE/${recalboxConfPath} \
&& recallog "BUMPED webmanager version in $_SHARE/${recalboxConfPath}." \
|| { recallog "ERROR: couldn't change webmanager version in $_SHARE/${recalboxConfPath}."; exit 1; }
......@@ -15,8 +15,8 @@ do_start() {
recallog "... Starting manager v${version}"
case "$version" in
1)
start-stop-daemon --start --background --user $RUN_AS --pidfile $PIDFILE --make-pidfile --chuid $RUN_AS --startas $CMD -- $OPTS
;;
recallog "WARNING: webmanager version 1 is not available anymore. Starting version 2 instead."
;&
2)
cd /usr/recalbox-manager2/ && NODE_ENV=production PORT=80 node dist/server.js &
;;
......@@ -29,8 +29,8 @@ do_stop() {
version="`$systemsetting -command load -key system.manager.version`"
case "$version" in
1)
start-stop-daemon --stop --pidfile $PIDFILE
;;
recallog "WARNING: webmanager version 1 is not available anymore. Stopping version 2 instead."
;&
2)
ps -ef | grep node | grep "dist/server.js" | grep -v grep | awk '{print $1}' | xargs kill
;;
......
config BR2_PACKAGE_RECALBOX_MANAGER
bool "recalbox-manager"
select BR2_PACKAGE_PYTHON_DJANGO
select BR2_PACKAGE_PYTHON_PSUTIL
select BR2_PACKAGE_PYTHON_AUTOBREADCRUMBS
help
https://github.com/sveetch/recalbox-manager
################################################################################
#
# recalbox-manager
#
################################################################################
RECALBOX_MANAGER_VERSION = recalbox-4.1.x
RECALBOX_MANAGER_SITE = $(call github,sveetch,recalbox-manager,$(RECALBOX_MANAGER_VERSION))
RECALBOX_MANAGER_DEPENDENCIES = python python-psutil python-django python-autobreadcrumbs
define RECALBOX_MANAGER_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/usr/recalbox-manager
cp -r $(@D)/* $(TARGET_DIR)/usr/recalbox-manager
cp $(RECALBOX_MANAGER_PKGDIR)/bd/db.sqlite3 $(TARGET_DIR)/usr/recalbox-manager
endef
$(eval $(generic-package))
--- a/requirements.txt 2015-10-12 19:25:13.106468090 +0200
+++ b/requirements.txt 2015-10-12 19:25:45.819803326 +0200
@@ -1,4 +1,3 @@
# Dependancies for basic install
django>=1.8
autobreadcrumbs==1.1
-psutil==2.1.3
\ No newline at end of file
--- a/Makefile 2015-12-21 00:22:55.000000000 +0100
+++ b/Makefile 2015-12-21 09:44:37.642079459 +0100
@@ -20,9 +20,7 @@
rm -Rf bin include lib local node_modules compass/.sass-cache
install:
- virtualenv --no-site-packages .
- bin/pip install -r pip-requirements/basic.txt
- bin/python manage.py migrate
+ python manage.py migrate
install-dev: install
bundle install --gemfile=compass/Gemfile
......@@ -26,7 +26,7 @@ system.splash.length=0
## Recalbox Manager (http manager)
system.manager.enabled=1
## 1 or 2, depending on the manager version you wish
## Currently, only version 2 is available
system.manager.version=2
## Recalbox security
......
......@@ -32,7 +32,7 @@ system.splash.length=0
## Recalbox Manager (http manager)
system.manager.enabled=1
## 1 or 2, depending on the manager version you wish
## Currently, only version 2 is available
system.manager.version=2
## Recalbox security
......
......@@ -32,7 +32,7 @@ system.splash.length=0
## Recalbox Manager (http manager)
system.manager.enabled=1
## 1 or 2, depending on the manager version you wish
## Currently, only version 2 is available
system.manager.version=2
## Recalbox security
......
......@@ -32,7 +32,7 @@ system.splash.length=0
## Recalbox Manager (http manager)
system.manager.enabled=1
## 1 or 2, depending on the manager version you wish
## Currently, only version 2 is available
system.manager.version=2
## Recalbox security
......
......@@ -13,7 +13,7 @@ system.splash.length=0
## Recalbox Manager (http manager)
system.manager.enabled=1
## 1 or 2, depending on the manager version you wish
## Currently, only version 2 is available
system.manager.version=2
## Recalbox security
......
......@@ -13,7 +13,7 @@ system.splash.length=0
## Recalbox Manager (http manager)
system.manager.enabled=1
## 1 or 2, depending on the manager version you wish
## Currently, only version 2 is available
system.manager.version=2
## Recalbox security
......
......@@ -26,7 +26,7 @@ system.splash.length=0
## Recalbox Manager (http manager)
system.manager.enabled=1
## 1 or 2, depending on the manager version you wish
## Currently, only version 2 is available
system.manager.version=2
## Recalbox security
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment