mirror of
https://github.com/YunoHost-Apps/pufferpanel_ynh.git
synced 2024-09-03 20:16:03 +02:00
Merge pull request #14 from YunoHost-Apps/datadir
moving the data folder to the standard ynh one
This commit is contained in:
commit
696f111be0
4 changed files with 25 additions and 6 deletions
|
@ -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": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
doc/ADMIN.md
Normal file
1
doc/ADMIN.md
Normal file
|
@ -0,0 +1 @@
|
|||
Game server files are stored in `__DATA_DIR__`
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue