mirror of
https://github.com/YunoHost-Apps/grist_ynh.git
synced 2024-09-03 20:36:18 +02:00
cleaning
This commit is contained in:
parent
88c8b9b33e
commit
038300d78d
6 changed files with 4 additions and 71 deletions
|
@ -7,12 +7,11 @@ name = "Grist"
|
|||
description.en = "Modern relational spreadsheet"
|
||||
description.fr = "Feuille de calcul relationnelle moderne"
|
||||
|
||||
version = "1.1.5~ynh2"
|
||||
version = "1.1.5~ynh1"
|
||||
|
||||
maintainers = ["fflorent"]
|
||||
|
||||
[upstream]
|
||||
# NB: Only the "license" key is mandatory. Remove entries for which there's no relevant data
|
||||
license = "AGPL-3.0-only"
|
||||
website = "https://getgrist.com"
|
||||
demo = "https://docs.getgrist.com"
|
||||
|
@ -36,12 +35,9 @@ ram.runtime = "150M"
|
|||
|
||||
[install]
|
||||
[install.domain]
|
||||
# this is a generic question - ask strings are automatically handled by YunoHost's core
|
||||
type = "domain"
|
||||
|
||||
[install.init_main_permission]
|
||||
# this is a generic question - ask strings are automatically handled by YunoHost's core
|
||||
# This won't be saved as setting and will instead be used to initialize the SSOwat permission
|
||||
type = "group"
|
||||
default = "visitors"
|
||||
|
||||
|
@ -53,51 +49,34 @@ ram.runtime = "150M"
|
|||
default = "en"
|
||||
|
||||
[install.admin]
|
||||
# this is a generic question - ask strings are automatically handled by YunoHost's core
|
||||
type = "user"
|
||||
|
||||
[resources]
|
||||
# See the packaging documentation for the full set
|
||||
# of explanation regarding the behavior and properties for each of those
|
||||
|
||||
[resources.sources]
|
||||
|
||||
[resources.sources.main]
|
||||
# This will pre-fetch the asset which can then be deployed during the install/upgrade scripts with :
|
||||
# ynh_setup_source --dest_dir="$install_dir"
|
||||
# You can also define other assets than "main" and add --source_id="foobar" in the previous command
|
||||
url = "https://github.com/gristlabs/grist-core/archive/refs/tags/v1.1.5.tar.gz"
|
||||
sha256 = "3119ba9be40d2adfca547cc80ecf9114e4b218449d84c7231a44f5fc0b5f0f4b"
|
||||
|
||||
autoupdate.strategy = "latest_github_tag"
|
||||
|
||||
[resources.system_user]
|
||||
# This will provision/deprovision a unix system user
|
||||
|
||||
[resources.install_dir]
|
||||
# This will create/remove the install dir as /var/www/$app
|
||||
# and store the corresponding setting $install_dir
|
||||
|
||||
[resources.data_dir]
|
||||
# This will create/remove the data dir as /home/yunohost.app/$app
|
||||
# and store the corresponding setting $data_dir
|
||||
|
||||
[resources.permissions]
|
||||
# This will configure SSOwat permission for $domain/$path/
|
||||
# The initial allowed group of user is configured via the init_main_permission question (public=visitors, private=all_users)
|
||||
main.url = "/"
|
||||
|
||||
login.url = "/auth/login"
|
||||
login.show_tile = false
|
||||
login.allowed = "all_users"
|
||||
|
||||
[resources.ports]
|
||||
# This will pick a random port for reverse-proxying and store it as the $port setting
|
||||
main.default = 8484
|
||||
|
||||
[resources.apt]
|
||||
# This will automatically install/uninstall the following apt packages
|
||||
# and implicitly define the $phpversion setting as 8.0 (if phpX.Y-foobar dependencies are listed)
|
||||
packages = "python3.9, python3.9-venv"
|
||||
|
||||
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
|
||||
|
|
|
@ -28,8 +28,8 @@ ynh_change_url_nginx_config
|
|||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Updating env configuration file..." --weight=1
|
||||
|
||||
domain="$new_domain"
|
||||
path="$new_path"
|
||||
ynh_add_config --template="default.env" --destination="$install_dir/default.env"
|
||||
|
|
|
@ -28,9 +28,6 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
|||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
# $install_dir will automatically be initialized with some decent
|
||||
# permission by default ... however, you may need to recursively reapply
|
||||
# ownership to all files such as after the ynh_setup_source step
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
pushd "$install_dir"
|
||||
|
@ -45,7 +42,6 @@ pushd "$install_dir/sandbox/pyodide"
|
|||
ynh_exec_warn_less ynh_exec_as $app make setup
|
||||
popd
|
||||
|
||||
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -78,9 +74,6 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|||
|
||||
ynh_add_config --template="default.env" --destination="$install_dir/default.env"
|
||||
|
||||
# FIXME: this should be handled by the core in the future
|
||||
# You may need to use chmod 600 instead of 400,
|
||||
# for example if the app is expected to be able to modify its own config
|
||||
chmod 400 "$install_dir/default.env"
|
||||
chown $app:$app "$install_dir/default.env"
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@ source /usr/share/yunohost/helpers
|
|||
# REMOVE SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
|
||||
|
||||
# This should be a symetric version of what happens in the install script
|
||||
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
|
||||
|
||||
# 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
|
||||
|
@ -35,8 +34,6 @@ ynh_remove_logrotate
|
|||
|
||||
ynh_redis_remove_db "$redis_db"
|
||||
|
||||
# Remove other various files specific to the app... such as :
|
||||
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -23,9 +23,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
# $install_dir will automatically be initialized with some decent
|
||||
# permissions by default ... however, you may need to recursively reapply
|
||||
# ownership to all files such as after the ynh_setup_source step
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
|
@ -45,8 +42,6 @@ chown -R $app:www-data "$data_dir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||
|
||||
# This should be a symetric version of what happens in the install script
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
|
|
|
@ -13,19 +13,8 @@ source /usr/share/yunohost/helpers
|
|||
|
||||
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
|
||||
|
||||
### This helper will compare the version of the currently installed app and the version of the upstream package.
|
||||
### $upgrade_type can have 2 different values
|
||||
### - UPGRADE_APP if the upstream app version has changed
|
||||
### - UPGRADE_PACKAGE if only the YunoHost package has changed
|
||||
### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
|
||||
### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
|
@ -56,9 +45,6 @@ then
|
|||
ynh_setup_source --dest_dir="$install_dir"
|
||||
fi
|
||||
|
||||
# $install_dir will automatically be initialized with some decent
|
||||
# permissions by default ... however, you may need to recursively reapply
|
||||
# ownership to all files such as after the ynh_setup_source step
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
|
@ -81,8 +67,6 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||
|
||||
# This should be a literal copypaste of what happened in the install's "System configuration" section
|
||||
|
||||
ynh_add_nginx_config
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
@ -98,26 +82,11 @@ ynh_use_logrotate --non-append
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||
|
||||
### Same as during install
|
||||
###
|
||||
### The file will automatically be backed-up if it's found to be manually modified (because
|
||||
### ynh_add_config keeps track of the file's checksum)
|
||||
|
||||
ynh_add_config --template="default.env" --destination="$install_dir/default.env"
|
||||
|
||||
# FIXME: this should be handled by the core in the future
|
||||
# You may need to use chmod 600 instead of 400,
|
||||
# for example if the app is expected to be able to modify its own config
|
||||
chmod 400 "$install_dir/default.env"
|
||||
chown $app:$app "$install_dir/default.env"
|
||||
|
||||
### For more complex cases where you want to replace stuff using regexes,
|
||||
### you shoud rely on ynh_replace_string (which is basically a wrapper for sed)
|
||||
### When doing so, you also need to manually call ynh_store_file_checksum
|
||||
###
|
||||
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$install_dir/some_config_file"
|
||||
### ynh_store_file_checksum --file="$install_dir/some_config_file"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue