diff --git a/modules/mediawiki/files/bin/mwdeploy.py b/modules/mediawiki/files/bin/mwdeploy.py index c1830054b5..823ad00ec6 100644 --- a/modules/mediawiki/files/bin/mwdeploy.py +++ b/modules/mediawiki/files/bin/mwdeploy.py @@ -235,7 +235,7 @@ def make_request(proto, domain, headers) -> requests.Response: else: proto = 'http://' req = make_request(proto, domain, headers) - if req.status_code == 200 and 'miraheze' in req.text and (Debug is None or Debug in req.headers['X-Served-By']): + if req.status_code == 200 and 'mainpageisdomainroot' in req.text and (Debug is None or Debug in req.headers['X-Served-By']): up = True if not up: print(f'Status: {req.status_code}') diff --git a/modules/mediawiki/files/bin/test_mwscript.py b/modules/mediawiki/files/bin/test_mwscript.py index 0b9c19670f..6fcbf73818 100644 --- a/modules/mediawiki/files/bin/test_mwscript.py +++ b/modules/mediawiki/files/bin/test_mwscript.py @@ -29,8 +29,8 @@ def test_get_command_extension_list(mock_getlogin): args.version = '1.39' assert mwscript.syscheck(mwscript.get_commands(args)) == { 'confirm': False, - 'command': f'sudo -u www-data /usr/local/bin/foreachwikiindblist /home/{os.environ["LOGNAME"]}/CheckUser.json /srv/mediawiki/1.39/maintenance/test.php', - 'generate': f'php /srv/mediawiki/1.39/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=CheckUser --directory=/home/{os.environ["LOGNAME"]}', + 'command': 'sudo -u www-data /usr/local/bin/foreachwikiindblist /tmp/CheckUser.json /srv/mediawiki/1.39/maintenance/test.php', + 'generate': 'sudo -u www-data php /srv/mediawiki/1.39/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=CheckUser --directory=/tmp', 'long': True, 'nolog': False, } @@ -86,8 +86,8 @@ def test_get_command_extension_list_runner(mock_getlogin): args.version = '1.40' assert mwscript.syscheck(mwscript.get_commands(args)) == { 'confirm': False, - 'command': f'sudo -u www-data /usr/local/bin/foreachwikiindblist /tmp/CheckUser.php /srv/mediawiki/1.40/maintenance/run.php /srv/mediawiki/1.40/maintenance/test.php', - 'generate': f'php /srv/mediawiki/1.40/maintenance/run.php /srv/mediawiki/1.40/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=CheckUser --directory=/tmp', + 'command': 'sudo -u www-data /usr/local/bin/foreachwikiindblist /tmp/CheckUser.json /srv/mediawiki/1.40/maintenance/run.php /srv/mediawiki/1.40/maintenance/test.php', + 'generate': 'sudo -u www-data php /srv/mediawiki/1.40/maintenance/run.php /srv/mediawiki/1.40/extensions/MirahezeMagic/maintenance/generateExtensionDatabaseList.php --wiki=loginwiki --extension=CheckUser --directory=/tmp', 'long': True, 'nolog': False, }