diff --git a/conf/config.json b/conf/config.json index 1b77585..2acd288 100644 --- a/conf/config.json +++ b/conf/config.json @@ -11,12 +11,12 @@ }, "daemon": { "data": { - "cache": "/var/lib/__APP__/cache", - "servers": "/var/lib/__APP__/servers" + "cache": "__DATA_DIR__/cache", + "servers": "__DATA_DIR__/servers" } }, "web": { - "host": "127.0.0.1:__PORT__" + "host": "127.0.0.1:__PORT__" }, "panel": { "email": { @@ -29,4 +29,4 @@ "key": "" } } -} +} \ No newline at end of file diff --git a/doc/ADMIN.md b/doc/ADMIN.md new file mode 100644 index 0000000..af60ee3 --- /dev/null +++ b/doc/ADMIN.md @@ -0,0 +1 @@ +Game server files are stored in `__DATA_DIR__` diff --git a/manifest.toml b/manifest.toml index 2179dc4..a79a9a8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,8 @@ description.fr = "Système de gestion de serveur de jeu" version = "2.6.9~ynh2" -maintainers = [""] +maintainers = [ "" ] + [upstream] license = "Apache-2.0" @@ -15,6 +16,7 @@ website = "https://www.pufferpanel.com/" admindoc = "https://docs.pufferpanel.com/en/latest/" code = "https://github.com/PufferPanel/PufferPanel" + [integration] yunohost = ">= 11.2" architectures = "all" @@ -25,6 +27,7 @@ disk = "50M" ram.build = "350M" ram.runtime = "50M" + [install] [install.domain] type = "domain" @@ -41,12 +44,16 @@ ram.runtime = "50M" [install.password] type = "password" + [resources] [resources.system_user] allow_email = true [resources.install_dir] + [resources.data_dir] + subdirs = [ "binaries", "cache", "servers" ] + [resources.ports] [resources.permissions] @@ -62,4 +69,3 @@ ram.runtime = "50M" [resources.database] type = "postgresql" - \ No newline at end of file diff --git a/scripts/upgrade b/scripts/upgrade index 66f3369..5d138c7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,6 +30,18 @@ ynh_script_progression --message="Stopping a systemd service..." ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd" +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." + +# moving the data folder to the standard ynh one +if [ -d "/var/lib/$app" ]; then + ynh_print_info --message="Moving the data folder from '/var/lib/$app' to '$data_dir'" + mv "/var/lib/$app" "$data_dir" + ynh_secure_remove "/var/lib/$app" +fi + #================================================= # UPGRADE DEPENDENCIES #=================================================