mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
some improvements
This commit is contained in:
parent
acd96f1382
commit
ef44abae6e
3 changed files with 22 additions and 26 deletions
|
@ -38,11 +38,11 @@ class MyMigration(Migration):
|
||||||
# Ignore the "www.conf" (default stuff, probably don't want to touch it ?)
|
# Ignore the "www.conf" (default stuff, probably don't want to touch it ?)
|
||||||
php70_pool_files = [f for f in php70_pool_files if f != "www.conf"]
|
php70_pool_files = [f for f in php70_pool_files if f != "www.conf"]
|
||||||
|
|
||||||
for f in php70_pool_files:
|
for pf in php70_pool_files:
|
||||||
|
|
||||||
# Copy the files to the php7.3 pool
|
# Copy the files to the php7.3 pool
|
||||||
src = "{}/{}".format(PHP70_POOLS, f)
|
src = "{}/{}".format(PHP70_POOLS, pf)
|
||||||
dest = "{}/{}".format(PHP73_POOLS, f)
|
dest = "{}/{}".format(PHP73_POOLS, pf)
|
||||||
copy2(src, dest)
|
copy2(src, dest)
|
||||||
|
|
||||||
# Replace the socket prefix if it's found
|
# Replace the socket prefix if it's found
|
||||||
|
@ -56,17 +56,17 @@ class MyMigration(Migration):
|
||||||
c = "sed -i '1i {}' {}".format(MIGRATION_COMMENT, dest)
|
c = "sed -i '1i {}' {}".format(MIGRATION_COMMENT, dest)
|
||||||
os.system(c)
|
os.system(c)
|
||||||
|
|
||||||
app_id = os.path.basename(f)[: -len(".conf")]
|
app_id = os.path.basename(pf)[: -len(".conf")]
|
||||||
if _is_installed(app_id):
|
if _is_installed(app_id):
|
||||||
_patch_legacy_php_versions_in_settings(
|
_patch_legacy_php_versions_in_settings(
|
||||||
"/etc/yunohost/apps/%s/" % app_id
|
"/etc/yunohost/apps/%s/" % app_id
|
||||||
)
|
)
|
||||||
|
|
||||||
nginx_conf_files = glob.glob("/etc/nginx/conf.d/*.d/%s.conf" % app_id)
|
nginx_conf_files = glob.glob("/etc/nginx/conf.d/*.d/%s.conf" % app_id)
|
||||||
for f in nginx_conf_files:
|
for nf in nginx_conf_files:
|
||||||
# Replace the socket prefix if it's found
|
# Replace the socket prefix if it's found
|
||||||
c = "sed -i -e 's@{}@{}@g' {}".format(
|
c = "sed -i -e 's@{}@{}@g' {}".format(
|
||||||
PHP70_SOCKETS_PREFIX, PHP73_SOCKETS_PREFIX, f
|
PHP70_SOCKETS_PREFIX, PHP73_SOCKETS_PREFIX, nf
|
||||||
)
|
)
|
||||||
os.system(c)
|
os.system(c)
|
||||||
|
|
||||||
|
|
|
@ -587,7 +587,7 @@ def service_regen_conf(
|
||||||
if name not in services.keys():
|
if name not in services.keys():
|
||||||
raise YunohostValidationError("service_unknown", service=name)
|
raise YunohostValidationError("service_unknown", service=name)
|
||||||
|
|
||||||
if names is []:
|
if names == []:
|
||||||
names = list(services.keys())
|
names = list(services.keys())
|
||||||
|
|
||||||
logger.warning(m18n.n("service_regen_conf_is_deprecated"))
|
logger.warning(m18n.n("service_regen_conf_is_deprecated"))
|
||||||
|
|
|
@ -236,11 +236,7 @@ def tools_postinstall(
|
||||||
|
|
||||||
# If this is a nohost.me/noho.st, actually check for availability
|
# If this is a nohost.me/noho.st, actually check for availability
|
||||||
if not ignore_dyndns and is_yunohost_dyndns_domain(domain):
|
if not ignore_dyndns and is_yunohost_dyndns_domain(domain):
|
||||||
# (Except if the user explicitly said he/she doesn't care about dyndns)
|
|
||||||
if ignore_dyndns:
|
|
||||||
dyndns = False
|
|
||||||
# Check if the domain is available...
|
# Check if the domain is available...
|
||||||
else:
|
|
||||||
try:
|
try:
|
||||||
available = _dyndns_available(domain)
|
available = _dyndns_available(domain)
|
||||||
# If an exception is thrown, most likely we don't have internet
|
# If an exception is thrown, most likely we don't have internet
|
||||||
|
|
Loading…
Add table
Reference in a new issue