mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
bugfix
This commit is contained in:
parent
ae378201c2
commit
a575d2d80c
2 changed files with 6 additions and 3 deletions
|
@ -302,7 +302,7 @@ app:
|
|||
### app_remove() TODO: Write help
|
||||
remove:
|
||||
action_help: Remove app
|
||||
api: DELETE /app
|
||||
api: DELETE /app/{app}
|
||||
arguments:
|
||||
app:
|
||||
help: App(s) to delete
|
||||
|
@ -310,7 +310,7 @@ app:
|
|||
### app_upgrade()
|
||||
upgrade:
|
||||
action_help: Upgrade app
|
||||
api: PUT /app
|
||||
api: PUT /app/{app}
|
||||
arguments:
|
||||
app:
|
||||
help: App(s) to upgrade (default all)
|
||||
|
|
|
@ -41,7 +41,7 @@ from yunohost_hook import hook_exec
|
|||
repo_path = '/var/cache/yunohost/repo'
|
||||
apps_path = '/usr/share/yunohost/apps'
|
||||
apps_setting_path= '/etc/yunohost/apps/'
|
||||
install_tmp = '/var/cache/yunohost/install'
|
||||
install_tmp = '/var/cache/yunohost'
|
||||
app_tmp_folder = install_tmp + '/from_file'
|
||||
|
||||
def app_listlists():
|
||||
|
@ -313,6 +313,7 @@ def app_upgrade(app, url=None, file=None):
|
|||
sources.write(re.sub(r''+ original_app_id +'', app_id, line))
|
||||
|
||||
# Execute App upgrade script
|
||||
os.system('chown -hR admin: '+ install_tmp)
|
||||
if hook_exec(app_tmp_folder +'/scripts/upgrade') != 0:
|
||||
#TODO: display fail messages from script
|
||||
pass
|
||||
|
@ -409,6 +410,7 @@ def app_install(app, label=None, args=None):
|
|||
args_dict = {}
|
||||
|
||||
# Execute App install script
|
||||
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
|
||||
os.system('mv "'+ app_tmp_folder +'/manifest.json" "'+ app_tmp_folder +'/scripts" '+ app_setting_path)
|
||||
|
@ -440,6 +442,7 @@ def app_remove(app):
|
|||
os.system('chmod -R 777 '+ app_setting_path)
|
||||
|
||||
#TODO: display fail messages from script
|
||||
os.system('chown -hR admin: '+ app_setting_path)
|
||||
if hook_exec(app_setting_path + '/scripts/remove') != 0:
|
||||
os.system('chmod -R 700 '+ app_setting_path)
|
||||
|
||||
|
|
Loading…
Reference in a new issue