mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
fix custom app
This commit is contained in:
parent
0399f99537
commit
b333c5e5b4
1 changed files with 9 additions and 4 deletions
|
@ -148,7 +148,9 @@ def app_list(offset=None, limit=None, filter=None, raw=False):
|
||||||
if original_app in app_dict:
|
if original_app in app_dict:
|
||||||
app_dict[app] = app_dict[original_app]
|
app_dict[app] = app_dict[original_app]
|
||||||
continue
|
continue
|
||||||
app_dict[app] = { 'orphan': True }
|
with open( apps_setting_path + app +'/manifest.json') as json_manifest:
|
||||||
|
app_dict[app] = {"manifest":json.loads(str(json_manifest.read()))}
|
||||||
|
app_dict[app]['manifest']['orphan']=True#{ 'orphan': True }
|
||||||
|
|
||||||
if len(app_dict) > (0 + offset) and limit > 0:
|
if len(app_dict) > (0 + offset) and limit > 0:
|
||||||
sorted_app_dict = {}
|
sorted_app_dict = {}
|
||||||
|
@ -409,11 +411,13 @@ def app_install(app, label=None, args=None):
|
||||||
except:
|
except:
|
||||||
args_dict = {}
|
args_dict = {}
|
||||||
|
|
||||||
|
|
||||||
# Execute App install script
|
# Execute App install script
|
||||||
os.system('chown -hR admin: '+ install_tmp)
|
os.system('chown -hR admin: '+ install_tmp)
|
||||||
if hook_exec(app_tmp_folder + '/scripts/install', args_dict) == 0:
|
|
||||||
# Move scripts and manifest to the right place
|
# Move scripts and manifest to the right place
|
||||||
os.system('mv "'+ app_tmp_folder +'/manifest.json" "'+ app_tmp_folder +'/scripts" '+ app_setting_path)
|
os.system('cp '+ app_tmp_folder +'/manifest.json ' + app_setting_path)
|
||||||
|
os.system('cp -R ' + app_tmp_folder +'/scripts '+ app_setting_path)
|
||||||
|
if hook_exec(app_tmp_folder + '/scripts/install', args_dict) == 0:
|
||||||
shutil.rmtree(app_tmp_folder)
|
shutil.rmtree(app_tmp_folder)
|
||||||
os.system('chmod -R 400 '+ app_setting_path)
|
os.system('chmod -R 400 '+ app_setting_path)
|
||||||
os.system('chown -R root: '+ app_setting_path)
|
os.system('chown -R root: '+ app_setting_path)
|
||||||
|
@ -697,6 +701,7 @@ def app_ssowatconf():
|
||||||
for domain in domains:
|
for domain in domains:
|
||||||
skipped_uri.extend([domain +'/ynhadmin', domain +'/ynhapi'])
|
skipped_uri.extend([domain +'/ynhadmin', domain +'/ynhapi'])
|
||||||
|
|
||||||
|
|
||||||
conf_dict = {
|
conf_dict = {
|
||||||
'portal_domain': main_domain,
|
'portal_domain': main_domain,
|
||||||
'portal_path': '/ynhsso/',
|
'portal_path': '/ynhsso/',
|
||||||
|
|
Loading…
Reference in a new issue