mirror of
https://github.com/YunoHost-Apps/epicyon_ynh.git
synced 2024-09-03 18:36:08 +02:00
commit
85b20fcfd9
3 changed files with 12 additions and 25 deletions
|
@ -9,7 +9,7 @@
|
||||||
"url": "https://epicyon.net/",
|
"url": "https://epicyon.net/",
|
||||||
"license": "AGPL-1.0-or-later",
|
"license": "AGPL-1.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "anmol"
|
"name": "Anmol Sharma"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.1.3"
|
"yunohost": ">= 4.1.3"
|
||||||
|
|
|
@ -131,7 +131,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
||||||
|
|
||||||
# Create admin
|
# Create admin
|
||||||
ynh_script_progression --message="Create admin user" --weight=1
|
ynh_script_progression --message="Create admin user" --weight=1
|
||||||
python3 $final_path/epicyon.py --addaccount $email --password $password
|
python3 $final_path/epicyon.py --addaccount $admin --password $password --domain $domain
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
@ -150,6 +150,7 @@ ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
|
||||||
ynh_permission_update --permission="main" --add="visitors"
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
|
|
||||||
|
ynh_permission_url --permission="main" --auth_header="false"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
|
@ -28,29 +28,6 @@ port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
|
||||||
|
|
||||||
|
|
||||||
# Cleaning legacy permissions
|
|
||||||
if ynh_legacy_permissions_exists; then
|
|
||||||
ynh_legacy_permissions_delete_all
|
|
||||||
|
|
||||||
ynh_app_setting_delete --app=$app --key=is_public
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! ynh_permission_exists --permission="admin"; then
|
|
||||||
# Create the required permissions
|
|
||||||
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create a permission if needed
|
|
||||||
if ! ynh_permission_exists --permission="api"; then
|
|
||||||
ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -145,6 +122,15 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP SSOWAT
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
|
||||||
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
|
|
||||||
|
ynh_permission_url --permission="main" --auth_header="false"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue