diff --git a/debian/fabscanpi-server.init b/debian/fabscanpi-server.init index 7a303050..f977c7af 100755 --- a/debian/fabscanpi-server.init +++ b/debian/fabscanpi-server.init @@ -1,4 +1,4 @@ -#!/bin/sh + #!/bin/sh # /etc/init.d/fabscanpi-server ### BEGIN INIT INFO # Provides: fabscanpi-server diff --git a/src/fabscan/lib/file/FSScans.py b/src/fabscan/lib/file/FSScans.py index f31ff2af..c7028731 100644 --- a/src/fabscan/lib/file/FSScans.py +++ b/src/fabscan/lib/file/FSScans.py @@ -44,11 +44,15 @@ def get_list_of_scans(self, host): response['scans'] = [] for dir in subdirectories: - if dir != "debug": - if os.path.os.path.exists(basedir + dir + "/scan_" + dir + ".ply"): + if dir != "debug" and dir != 'calibration': + if any(File.endswith(".ply") for File in os.listdir(basedir + dir)): scan = dict() scan['id'] = str(dir) - scan['pointcloud'] = str("http://" + host + "/scans/" + dir + "/scan_" + dir + ".ply") + if os.path.os.path.exists(basedir + dir + "/scan_" + dir + "_both.ply"): + scan['pointcloud'] = str("http://" + host + "/scans/" + dir + "/scan_" + dir + "_both.ply") + else: + scan['pointcloud'] = str("http://" + host + "/scans/" + dir + "/scan_" + dir + "_0.ply") + scan['thumbnail'] = str("http://" + host + "/scans/" + dir + "/thumbnail_" + dir + ".png") response['scans'].append(scan) diff --git a/src/fabscan/lib/util/FSUpdate.py b/src/fabscan/lib/util/FSUpdate.py index f471627a..b2b26201 100644 --- a/src/fabscan/lib/util/FSUpdate.py +++ b/src/fabscan/lib/util/FSUpdate.py @@ -84,7 +84,7 @@ def upgrade_is_available(current_version, online_lookup_ip): def do_upgrade(): try: rc_update = FSSystem.run_command("sudo apt-get update") - rc_upgrade = FSSystem.run_command("sudo apt-get install fabscanpi-server") + rc_upgrade = FSSystem.run_command("sudo apt-get install -o Dpkg::Options::='--force-confnew' fabscanpi-server") return (rc_update == 0 and rc_upgrade == 0) except Exception, e: diff --git a/src/fabscan/server/FSScanServer.py b/src/fabscan/server/FSScanServer.py index 5dcadc42..9d53fca0 100644 --- a/src/fabscan/server/FSScanServer.py +++ b/src/fabscan/server/FSScanServer.py @@ -64,10 +64,6 @@ def on_server_command(self, mgr, event): self.eventManager.instance.broadcast_client_message(FSEvents.ON_INFO_MESSAGE, message) self._logger.error('Update failed.') - if command == FSCommand.RESTART_SERVER: - self.restart = True - self.restart() - def restart(self, override_sys=False): message = { "message": "RESTARTING_SERVER",