mirror of
https://github.com/YunoHost-Apps/pufferpanel_ynh.git
synced 2024-09-03 20:16:03 +02:00
commit
34c8b84ff4
19 changed files with 258 additions and 40 deletions
|
@ -1,6 +1,8 @@
|
|||
# All available README files by language
|
||||
|
||||
- [Read the README in English](README.md)
|
||||
- [Lee el README en español](README_es.md)
|
||||
- [Irakurri README euskaraz](README_eu.md)
|
||||
- [Lire le README en français](README_fr.md)
|
||||
- [Le o README en galego](README_gl.md)
|
||||
- [Leggi il “README” in italiano](README_it.md)
|
||||
- [阅读中文(简体)的 README](README_zh_Hans.md)
|
||||
|
|
|
@ -9,14 +9,15 @@ It shall NOT be edited by hand.
|
|||
|
||||
[](https://install-app.yunohost.org/?app=pufferpanel)
|
||||
|
||||
*[Read this README is other languages.](./ALL_README.md)*
|
||||
*[Read this README in other languages.](./ALL_README.md)*
|
||||
|
||||
> *This package allows you to install PufferPanel quickly and simply on a YunoHost server.*
|
||||
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
|
||||
|
||||
## Overview
|
||||
|
||||
PufferPanel is an open source game server management panel designed to be easy to use and easy to install. PufferPanel supports Minecraft, Forge, Spigot, Sponge, Source Dedicated Servers, BungeeCord, PocketMine, Forge, and much more.
|
||||
PufferPanel is a web-based Game Server Management System created by players for players. PufferPanel allows you to run multiple different game servers all from one central location, and give other users their own servers, or access to your own servers.
|
||||
|
||||
|
||||
**Shipped version:** 2.6.9~ynh2
|
||||
|
||||
|
|
48
README_es.md
Normal file
48
README_es.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
<!--
|
||||
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
No se debe editar a mano.
|
||||
-->
|
||||
|
||||
# PufferPanel para Yunohost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/pufferpanel)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=pufferpanel)
|
||||
|
||||
*[Leer este README en otros idiomas.](./ALL_README.md)*
|
||||
|
||||
> *Este paquete le permite instalarPufferPanel rapidamente y simplement en un servidor YunoHost.*
|
||||
> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
|
||||
|
||||
## Descripción general
|
||||
|
||||
PufferPanel is a web-based Game Server Management System created by players for players. PufferPanel allows you to run multiple different game servers all from one central location, and give other users their own servers, or access to your own servers.
|
||||
|
||||
|
||||
**Versión actual:** 2.6.9~ynh2
|
||||
|
||||
## Capturas
|
||||
|
||||

|
||||
|
||||
## Documentaciones y recursos
|
||||
|
||||
- Sitio web oficial: <https://www.pufferpanel.com/>
|
||||
- Documentación administrador oficial: <https://docs.pufferpanel.com/en/latest/>
|
||||
- Repositorio del código fuente oficial de la aplicación : <https://github.com/PufferPanel/PufferPanel>
|
||||
- Catálogo YunoHost: <https://apps.yunohost.org/app/pufferpanel>
|
||||
- Reportar un error: <https://github.com/YunoHost-Apps/pufferpanel_ynh/issues>
|
||||
|
||||
## Información para desarrolladores
|
||||
|
||||
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing
|
||||
|
||||
Para probar la rama `testing`, sigue asÍ:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing --debug
|
||||
o
|
||||
sudo yunohost app upgrade pufferpanel -u https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>
|
48
README_eu.md
Normal file
48
README_eu.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
<!--
|
||||
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
|
||||
EZ editatu eskuz.
|
||||
-->
|
||||
|
||||
# PufferPanel YunoHost-erako
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/pufferpanel)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=pufferpanel)
|
||||
|
||||
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
|
||||
|
||||
> *Pakete honek PufferPanel YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
|
||||
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
|
||||
|
||||
## Aurreikuspena
|
||||
|
||||
PufferPanel is a web-based Game Server Management System created by players for players. PufferPanel allows you to run multiple different game servers all from one central location, and give other users their own servers, or access to your own servers.
|
||||
|
||||
|
||||
**Paketatutako bertsioa:** 2.6.9~ynh2
|
||||
|
||||
## Pantaila-argazkiak
|
||||
|
||||

|
||||
|
||||
## Dokumentazioa eta baliabideak
|
||||
|
||||
- Aplikazioaren webgune ofiziala: <https://www.pufferpanel.com/>
|
||||
- Administratzaileen dokumentazio ofiziala: <https://docs.pufferpanel.com/en/latest/>
|
||||
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/PufferPanel/PufferPanel>
|
||||
- YunoHost Denda: <https://apps.yunohost.org/app/pufferpanel>
|
||||
- Eman errore baten berri: <https://github.com/YunoHost-Apps/pufferpanel_ynh/issues>
|
||||
|
||||
## Garatzaileentzako informazioa
|
||||
|
||||
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing).
|
||||
|
||||
`testing` abarra probatzeko, ondorengoa egin:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing --debug
|
||||
edo
|
||||
sudo yunohost app upgrade pufferpanel -u https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>
|
|
@ -16,7 +16,8 @@ Il NE doit PAS être modifié à la main.
|
|||
|
||||
## Vue d’ensemble
|
||||
|
||||
PufferPanel est un panneau de gestion de serveur de jeu open source conçu pour être facile à utiliser et à installer. PufferPanel prend en charge Minecraft, Forge, Spigot, Sponge, Source Dedicated Servers, BungeeCord, PocketMine, Forge et bien plus encore.
|
||||
PufferPanel est un système de gestion de serveur de jeu basé sur le Web créé par des joueurs pour des joueurs. PufferPanel vous permet d'exécuter plusieurs serveurs de jeu différents à partir d'un emplacement central et de donner aux autres utilisateurs leurs propres serveurs ou un accès à vos propres serveurs.
|
||||
|
||||
|
||||
**Version incluse :** 2.6.9~ynh2
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ NON debe editarse manualmente.
|
|||
|
||||
## Vista xeral
|
||||
|
||||
PufferPanel is an open source game server management panel designed to be easy to use and easy to install. PufferPanel supports Minecraft, Forge, Spigot, Sponge, Source Dedicated Servers, BungeeCord, PocketMine, Forge, and much more.
|
||||
PufferPanel is a web-based Game Server Management System created by players for players. PufferPanel allows you to run multiple different game servers all from one central location, and give other users their own servers, or access to your own servers.
|
||||
|
||||
|
||||
**Versión proporcionada:** 2.6.9~ynh2
|
||||
|
||||
|
|
48
README_zh_Hans.md
Normal file
48
README_zh_Hans.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
<!--
|
||||
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
|
||||
请勿手动编辑。
|
||||
-->
|
||||
|
||||
# YunoHost 上的 PufferPanel
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/pufferpanel)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=pufferpanel)
|
||||
|
||||
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
|
||||
|
||||
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 PufferPanel。*
|
||||
> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。*
|
||||
|
||||
## 概况
|
||||
|
||||
PufferPanel is a web-based Game Server Management System created by players for players. PufferPanel allows you to run multiple different game servers all from one central location, and give other users their own servers, or access to your own servers.
|
||||
|
||||
|
||||
**分发版本:** 2.6.9~ynh2
|
||||
|
||||
## 截图
|
||||
|
||||

|
||||
|
||||
## 文档与资源
|
||||
|
||||
- 官方应用网站: <https://www.pufferpanel.com/>
|
||||
- 官方管理文档: <https://docs.pufferpanel.com/en/latest/>
|
||||
- 上游应用代码库: <https://github.com/PufferPanel/PufferPanel>
|
||||
- YunoHost 商店: <https://apps.yunohost.org/app/pufferpanel>
|
||||
- 报告 bug: <https://github.com/YunoHost-Apps/pufferpanel_ynh/issues>
|
||||
|
||||
## 开发者信息
|
||||
|
||||
请向 [`testing` 分支](https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing) 发送拉取请求。
|
||||
|
||||
如要尝试 `testing` 分支,请这样操作:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing --debug
|
||||
或
|
||||
sudo yunohost app upgrade pufferpanel -u https://github.com/YunoHost-Apps/pufferpanel_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>
|
|
@ -2,20 +2,28 @@
|
|||
"logs": "/var/log/__APP__",
|
||||
"panel": {
|
||||
"database": {
|
||||
"dialect": "sqlite3",
|
||||
"url": "file:/var/lib/__APP__/database.db?cache=shared"
|
||||
"dialect": "postgresql",
|
||||
"url": "user=__DB_USER__ password=__DB_PWD__ dbname=__DB_NAME__ port=5432 sslmode=disable"
|
||||
},
|
||||
"web": {
|
||||
"files": "__INSTALL_DIR__"
|
||||
},
|
||||
"email": {
|
||||
"provider": "smtp",
|
||||
"from": "__EMAIL__",
|
||||
"host": "localhost",
|
||||
"username": "__APP__",
|
||||
"password": "__MAIL_PWD__"
|
||||
}
|
||||
},
|
||||
"daemon": {
|
||||
"data": {
|
||||
"cache": "/var/lib/__APP__/cache",
|
||||
"servers": "/var/lib/__APP__/servers"
|
||||
"binaries": "__DATA_DIR__/binaries",
|
||||
"cache": "__DATA_DIR__/cache",
|
||||
"servers": "__DATA_DIR__/servers"
|
||||
}
|
||||
},
|
||||
"web": {
|
||||
"host": "127.0.0.1:__PORT__"
|
||||
"host": "127.0.0.1:__PORT__"
|
||||
}
|
||||
}
|
||||
}
|
1
doc/ADMIN.md
Normal file
1
doc/ADMIN.md
Normal file
|
@ -0,0 +1 @@
|
|||
Game server files are stored in `__DATA_DIR__`
|
|
@ -1 +1 @@
|
|||
PufferPanel is an open source game server management panel designed to be easy to use and easy to install. PufferPanel supports Minecraft, Forge, Spigot, Sponge, Source Dedicated Servers, BungeeCord, PocketMine, Forge, and much more.
|
||||
PufferPanel is a web-based Game Server Management System created by players for players. PufferPanel allows you to run multiple different game servers all from one central location, and give other users their own servers, or access to your own servers.
|
||||
|
|
|
@ -1 +1 @@
|
|||
PufferPanel est un panneau de gestion de serveur de jeu open source conçu pour être facile à utiliser et à installer. PufferPanel prend en charge Minecraft, Forge, Spigot, Sponge, Source Dedicated Servers, BungeeCord, PocketMine, Forge et bien plus encore.
|
||||
PufferPanel est un système de gestion de serveur de jeu basé sur le Web créé par des joueurs pour des joueurs. PufferPanel vous permet d'exécuter plusieurs serveurs de jeu différents à partir d'un emplacement central et de donner aux autres utilisateurs leurs propres serveurs ou un accès à vos propres serveurs.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
|
||||
|
||||
packaging_format = 2
|
||||
|
||||
id = "pufferpanel"
|
||||
|
@ -7,7 +9,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 +18,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 +29,7 @@ disk = "50M"
|
|||
ram.build = "350M"
|
||||
ram.runtime = "50M"
|
||||
|
||||
|
||||
[install]
|
||||
[install.domain]
|
||||
type = "domain"
|
||||
|
@ -41,11 +46,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]
|
||||
|
@ -53,9 +63,11 @@ ram.runtime = "50M"
|
|||
main.auth_header = false
|
||||
|
||||
[resources.apt]
|
||||
packages = "sqlite3"
|
||||
packages = "postgresql"
|
||||
|
||||
extras.pufferpanel.repo = "deb https://packagecloud.io/pufferpanel/pufferpanel/debian/ buster main"
|
||||
extras.pufferpanel.key = "https://packagecloud.io/pufferpanel/pufferpanel/gpgkey"
|
||||
extras.pufferpanel.packages = "pufferpanel"
|
||||
|
||||
|
||||
[resources.database]
|
||||
type = "postgresql"
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
main_domain=$(cat /etc/yunohost/current_host)
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -21,6 +21,12 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$data_dir" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -32,7 +38,13 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/$app/"
|
||||
ynh_backup --src_path="/var/lib/$app/"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
ynh_print_info --message="Backing up the PostgreSQL database..."
|
||||
|
||||
ynh_psql_dump_db --database="$db_name" > db.sql
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||
ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd"
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
|
@ -33,7 +33,7 @@ ynh_change_url_nginx_config
|
|||
ynh_script_progression --message="Starting a systemd service..."
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Listening for"
|
||||
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Listening for"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -13,14 +13,14 @@ source /usr/share/yunohost/helpers
|
|||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
mail=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
email=$(ynh_user_get_info --username="$admin" --key=mail)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating installation parameters..."
|
||||
|
||||
if [[ $admin < 5 ]]; then
|
||||
if [[ ${#admin} -lt 5 ]]; then
|
||||
ynh_die --message="Admin username minimum length is 5"
|
||||
fi
|
||||
|
||||
|
@ -30,7 +30,7 @@ fi
|
|||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -40,9 +40,9 @@ ynh_script_progression --message="Configuring NGINX web server..."
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
systemctl enable $app.service --quiet
|
||||
systemctl enable "$app.service" --quiet
|
||||
|
||||
yunohost service add $app --description="Web-based Game Server Management System" --log="/var/log/$app/$app.log"
|
||||
yunohost service add "$app" --description="Web-based Game Server Management System" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
|
@ -54,9 +54,9 @@ ynh_script_progression --message="Adding a configuration file..."
|
|||
ynh_add_config --template="config.json" --destination="/etc/$app/config.json"
|
||||
|
||||
chmod 650 "/etc/$app/config.json"
|
||||
chown $app:$app "/etc/$app/config.json"
|
||||
chown "$app:$app" "/etc/$app/config.json"
|
||||
|
||||
pufferpanel user add --admin --email=$mail --name=$admin --password=$password
|
||||
pufferpanel user add --admin --email="$email" --name="$admin" --password="$password"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
@ -66,7 +66,7 @@ pufferpanel user add --admin --email=$mail --name=$admin --password=$password
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Listening for"
|
||||
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Listening for"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -16,15 +16,17 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
if ynh_exec_warn_less yunohost service status "$app" >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..."
|
||||
yunohost service remove $app
|
||||
yunohost service remove "$app"
|
||||
fi
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
ynh_secure_remove "/etc/$app/"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -19,7 +19,23 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
|
||||
|
||||
ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the data directory..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
chown -R "$app:www-data" "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE VARIOUS FILES
|
||||
|
@ -27,13 +43,12 @@ chown -R $app:www-data "$install_dir"
|
|||
ynh_script_progression --message="Restoring various files..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/$app/"
|
||||
ynh_restore_file --origin_path="/var/lib/$app/"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
systemctl enable $app.service --quiet
|
||||
systemctl enable "$app.service" --quiet
|
||||
|
||||
yunohost service add $app --description="Web-based Game Server Management System" --log="/var/log/$app/$app.log"
|
||||
yunohost service add "$app" --description="Web-based Game Server Management System" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
@ -42,7 +57,7 @@ yunohost service add $app --description="Web-based Game Server Management System
|
|||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Listening for"
|
||||
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Listening for"
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
email=$(ynh_user_get_info --username="$admin" --key=mail)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
@ -22,7 +28,18 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||
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"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
|
@ -30,7 +47,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
|||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
|
@ -40,9 +57,9 @@ ynh_script_progression --message="Upgrading system configurations related to $ap
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
systemctl enable $app.service --quiet
|
||||
systemctl enable "$app.service" --quiet
|
||||
|
||||
yunohost service add $app --description="Web-based Game Server Management System" --log="/var/log/$app/$app.log"
|
||||
yunohost service add "$app" --description="Web-based Game Server Management System" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
|
@ -52,14 +69,14 @@ ynh_script_progression --message="Updating a configuration file..."
|
|||
ynh_add_config --template="config.json" --destination="/etc/$app/config.json"
|
||||
|
||||
chmod 650 "/etc/$app/config.json"
|
||||
chown $app:$app "/etc/$app/config.json"
|
||||
chown "$app:$app" "/etc/$app/config.json"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Listening for"
|
||||
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Listening for"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue