diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py index 58bb259f7..eace6ca2e 100644 --- a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py +++ b/src/yunohost/data_migrations/0021_migrate_to_bullseye.py @@ -87,8 +87,8 @@ class MyMigration(Migration): # and the code inside /usr/bin/deb-systemd-invoke to see how it calls /usr/sbin/policy-rc.d ... # and also invoke-rc.d ... write_to_file( - '/usr/sbin/policy-rc.d', - '#!/bin/bash\n[[ "$1" =~ "nginx" ]] && [[ "$2" == "restart" ]] && exit 101 || exit 0' + "/usr/sbin/policy-rc.d", + '#!/bin/bash\n[[ "$1" =~ "nginx" ]] && [[ "$2" == "restart" ]] && exit 101 || exit 0', ) os.system("chmod +x /usr/sbin/policy-rc.d") @@ -260,7 +260,6 @@ class MyMigration(Migration): raw_msg=True, ) - postupgradecmds = f"apt-mark auto {' '.join(basephp74packages_to_install)}\n" postupgradecmds += "rm -f /usr/sbin/policy-rc.d\n" postupgradecmds += "echo 'Restarting nginx...' >&2\n" diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index 1eaad28bf..dbd3af5f5 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -448,7 +448,12 @@ def _list_upgradable_apps(): @is_unit_operation() def tools_upgrade( - operation_logger, target=None, apps=False, system=False, allow_yunohost_upgrade=True, postupgradecmds="" + operation_logger, + target=None, + apps=False, + system=False, + allow_yunohost_upgrade=True, + postupgradecmds="", ): """ Update apps & package cache, then display changelog