mirror of
https://github.com/YunoHost-Apps/hubzilla_ynh.git
synced 2024-09-03 19:26:21 +02:00
v2
This commit is contained in:
parent
cc75f15cf9
commit
082016b87d
6 changed files with 12 additions and 126 deletions
|
@ -1,58 +0,0 @@
|
||||||
{
|
|
||||||
"packaging_format": 1,
|
|
||||||
"id": "hubzilla",
|
|
||||||
"name": "Hubzilla",
|
|
||||||
"description": {
|
|
||||||
"en": "Decentralized publication platform and social network.",
|
|
||||||
"fr": "Plateforme de publication décentralisée et un réseau social."
|
|
||||||
},
|
|
||||||
"version": "8.4.1~ynh1",
|
|
||||||
"url": "https://zotlabs.org/page/hubzilla/hubzilla-project",
|
|
||||||
"upstream": {
|
|
||||||
"license": "MIT",
|
|
||||||
"website": "https://zotlabs.org/page/hubzilla/hubzilla-project",
|
|
||||||
"code": "https://framagit.org/hubzilla/core"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"maintainer": {
|
|
||||||
"name": "Anmol Sharma"
|
|
||||||
},
|
|
||||||
"previous_maintainers": {
|
|
||||||
"name": "Andrew Manning",
|
|
||||||
"email": "andrew@reticu.li"
|
|
||||||
},
|
|
||||||
"requirements": {
|
|
||||||
"yunohost": ">= 11.0.9"
|
|
||||||
},
|
|
||||||
"multi_instance": true,
|
|
||||||
"services": [
|
|
||||||
"nginx",
|
|
||||||
"php8.0-fpm",
|
|
||||||
"mysql"
|
|
||||||
],
|
|
||||||
"arguments": {
|
|
||||||
"install": [
|
|
||||||
{
|
|
||||||
"name": "domain",
|
|
||||||
"type": "domain"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "admin",
|
|
||||||
"type": "user"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "database",
|
|
||||||
"type": "string",
|
|
||||||
"ask": {
|
|
||||||
"en": "Choose the database to be used for the Hubzilla]",
|
|
||||||
"fr": "Choisissez la database de Hubzilla"
|
|
||||||
},
|
|
||||||
"choices": [
|
|
||||||
"mysql",
|
|
||||||
"postgresql"
|
|
||||||
],
|
|
||||||
"default": "mysql"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -13,27 +13,23 @@ maintainers = ["Anmol Sharma"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
website = "https://zotlabs.org/page/hubzilla/hubzilla-project"
|
website = "https://zotlabs.org/page/hubzilla/hubzilla-project"
|
||||||
code = "https://framagit.org/hubzilla/core"
|
code = "https://framagit.org/hubzilla/core"
|
||||||
cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number)
|
|
||||||
fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin.
|
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.0.9"
|
yunohost = ">= 11.1.19"
|
||||||
architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"]
|
architectures = "all"
|
||||||
multi_instance = true
|
multi_instance = true
|
||||||
ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials.
|
ldap = false
|
||||||
sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal.
|
sso = false
|
||||||
disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ...
|
disk = "50M"
|
||||||
ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
ram.build = "50M"
|
||||||
ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ...
|
ram.runtime = "50M"
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
[install.domain]
|
[install.domain]
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "domain"
|
type = "domain"
|
||||||
full_domain = true
|
full_domain = true
|
||||||
|
|
||||||
[install.admin]
|
[install.admin]
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "user"
|
type = "user"
|
||||||
|
|
||||||
[install.database]
|
[install.database]
|
||||||
|
@ -61,5 +57,9 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
||||||
|
[resources.apt]
|
||||||
|
packages = "php8.2-curl php8.2-gd php8.2-mysql php8.2-mbstring php8.2-xml php8.2-zip php8.2-cli php8.2-imagick php8.2-pgsql php8.2-json"
|
||||||
|
|
||||||
|
|
||||||
[resources.database]
|
[resources.database]
|
||||||
type = "mysql"
|
type = "mysql"
|
||||||
|
|
|
@ -9,28 +9,10 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# MANAGE SCRIPT FAILURE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#REMOVEME? ynh_clean_setup () {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
# Exit if an error occurs during the execution of the script
|
|
||||||
#REMOVEME? ynh_abort_if_errors
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
#REMOVEME? domain=$YNH_APP_ARG_DOMAIN
|
|
||||||
path="/"
|
|
||||||
#REMOVEME? admin=$YNH_APP_ARG_ADMIN
|
|
||||||
#REMOVEME? database=$YNH_APP_ARG_DATABASE
|
|
||||||
#REMOVEME? phpversion=$YNH_PHP_VERSION
|
|
||||||
|
|
||||||
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||||
upload="256M"
|
upload="256M"
|
||||||
random_string="$(ynh_string_random --length=48)"
|
random_string="$(ynh_string_random --length=48)"
|
||||||
|
@ -38,25 +20,11 @@ fpm_footprint="low"
|
||||||
fpm_free_footprint=0
|
fpm_free_footprint=0
|
||||||
fpm_usage="low"
|
fpm_usage="low"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
|
||||||
#=================================================
|
|
||||||
#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1
|
|
||||||
|
|
||||||
#REMOVEME? install_dir=/var/www/$app
|
|
||||||
#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder"
|
|
||||||
|
|
||||||
# Register (book) web path
|
|
||||||
#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# STORE SETTINGS FROM MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
#REMOVEME? ynh_script_progression --message="Storing installation settings..." --weight=1
|
ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||||
|
|
||||||
#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain
|
|
||||||
#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path
|
|
||||||
#REMOVEME? ynh_app_setting_set --app=$app --key=admin --value=$admin
|
|
||||||
ynh_app_setting_set --app=$app --key=database --value=$database
|
ynh_app_setting_set --app=$app --key=database --value=$database
|
||||||
ynh_app_setting_set --app=$app --key=email --value=$email
|
ynh_app_setting_set --app=$app --key=email --value=$email
|
||||||
ynh_app_setting_set --app=$app --key=upload --value=$upload
|
ynh_app_setting_set --app=$app --key=upload --value=$upload
|
||||||
|
@ -200,22 +168,6 @@ ynh_script_progression --message="Configuring Fail2Ban..." --weight=1
|
||||||
# Create a dedicated Fail2Ban config
|
# Create a dedicated Fail2Ban config
|
||||||
ynh_add_fail2ban_config --logpath="$install_dir/php.log" --failregex="^.*auth\.php.*failed login attempt.*from IP <HOST>.*$" --max_retry="5"
|
ynh_add_fail2ban_config --logpath="$install_dir/php.log" --failregex="^.*auth\.php.*failed login attempt.*from IP <HOST>.*$" --max_retry="5"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SETUP SSOWAT
|
|
||||||
#=================================================
|
|
||||||
#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1
|
|
||||||
|
|
||||||
# Everyone can access the app.
|
|
||||||
# The "main" permission is automatically created before the install script.
|
|
||||||
#REMOVEME? ynh_permission_update --permission="main" --add="visitors"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RELOAD NGINX
|
|
||||||
#=================================================
|
|
||||||
#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
|
||||||
|
|
||||||
#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -151,7 +151,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
||||||
#REMOVEME? phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -218,13 +217,6 @@ ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=1
|
||||||
# Create a dedicated Fail2Ban config
|
# Create a dedicated Fail2Ban config
|
||||||
ynh_add_fail2ban_config --logpath="$install_dir/php.log" --failregex="^.*auth\.php.*failed login attempt.*from IP <HOST>.*$" --max_retry="5"
|
ynh_add_fail2ban_config --logpath="$install_dir/php.log" --failregex="^.*auth\.php.*failed login attempt.*from IP <HOST>.*$" --max_retry="5"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RELOAD NGINX
|
|
||||||
#=================================================
|
|
||||||
#REMOVEME? ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
|
||||||
|
|
||||||
#REMOVEME? ynh_systemd_action --service_name=nginx --action=reload
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue