mirror of
https://github.com/YunoHost-Apps/ttrss_ynh.git
synced 2024-10-01 13:34:46 +02:00
cleaning
This commit is contained in:
parent
7aa26bd97c
commit
1375738bf5
7 changed files with 11 additions and 59 deletions
|
@ -5,7 +5,7 @@ name = "Tiny Tiny RSS"
|
|||
description.en = "News feed (RSS/Atom) reader and aggregator"
|
||||
description.fr = "Lecteur de flux d’actualité utilisant les protocoles RSS et Atom"
|
||||
|
||||
version = "20231202~ynh3"
|
||||
version = "20240831~ynh1"
|
||||
|
||||
maintainers = []
|
||||
|
||||
|
@ -17,7 +17,7 @@ admindoc = "https://tt-rss.org/wiki.php"
|
|||
code = "https://gitlab.tt-rss.org/tt-rss/tt-rss"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2.18"
|
||||
yunohost = ">= 11.2.29"
|
||||
helpers_version = "2.1"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
|
@ -44,8 +44,8 @@ ram.runtime = "50M"
|
|||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
url = "https://gitlab.tt-rss.org/tt-rss/tt-rss/-/archive/2b8e34453234b8b31ebc9e7020f8677bf3889898.tar.gz"
|
||||
sha256 = "72ec560bd5ad7bac4789d7af0e5c2d7c1c394e9c540d46d5421ecae219d8f875"
|
||||
url = "https://gitlab.tt-rss.org/tt-rss/tt-rss/-/archive/d5d47b8e500542fc4b6f89ef11bef3ceae833063.tar.gz"
|
||||
sha256 = "72e13a9e1b568055c9c6d072d8ec5b87d670af59e63f6202cfad1fe333b15866"
|
||||
autoupdate.strategy = "latest_gitlab_commit"
|
||||
|
||||
[resources.system_user]
|
||||
|
@ -69,7 +69,7 @@ ram.runtime = "50M"
|
|||
api.allowed = "visitors"
|
||||
|
||||
[resources.apt]
|
||||
packages = "postgresql, php8.2-pgsql, php8.2-curl, php8.2-gd, php8.2-opcache, php8.2-fileinfo, php8.2-intl, php8.2-cli, php8.2-mbstring, php8.2-xml"
|
||||
packages = "postgresql, php8.3-pgsql, php8.3-curl, php8.3-gd, php8.3-opcache, php8.3-fileinfo, php8.3-intl, php8.3-cli, php8.3-mbstring, php8.3-xml"
|
||||
|
||||
[resources.database]
|
||||
type = "postgresql"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -18,16 +17,8 @@ ynh_backup "$install_dir"
|
|||
|
||||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP SYSTEMD
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/systemd/system/$app.service"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -28,9 +28,6 @@ domain="$new_domain"
|
|||
path="$new_path"
|
||||
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
|
||||
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/config.php"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app "$install_dir/config.php"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
|
@ -10,12 +10,9 @@ ynh_app_setting_set --key=php_upload_max_filesize --value=10M
|
|||
#=================================================
|
||||
ynh_script_progression "Setting up source files..."
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
echo "$(ynh_app_upstream_version)" > "$install_dir/version_static.txt"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -41,9 +38,6 @@ ynh_script_progression "Adding $app's configuration..."
|
|||
|
||||
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
|
||||
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/config.php"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app "$install_dir/config.php"
|
||||
|
||||
#=================================================
|
||||
# INITIALIZE DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -11,20 +11,16 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression "Removing system configurations related to $app..."
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_hide_warnings yunohost service status $app >/dev/null
|
||||
then
|
||||
ynh_script_progression "Removing $app service integration..."
|
||||
yunohost service remove $app
|
||||
fi
|
||||
|
||||
# Remove the dedicated systemd config
|
||||
ynh_config_remove_systemd
|
||||
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_config_remove_nginx
|
||||
|
||||
# Remove the dedicated PHP-FPM config
|
||||
ynh_config_remove_phpfpm
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..."
|
|||
|
||||
ynh_restore "$install_dir"
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# RESTORE THE POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -17,38 +17,25 @@ ynh_systemctl --service=$app --action="stop" --log_path="systemd"
|
|||
#=================================================
|
||||
ynh_script_progression "Ensuring downward compatibility..."
|
||||
|
||||
# Do not remove the file before the backup, to not fail the backup.
|
||||
# Remove old cron job
|
||||
ynh_safe_rm "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
|
||||
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
|
||||
if ynh_app_upstream_version_changed
|
||||
then
|
||||
ynh_script_progression "Upgrading source files..."
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
echo "$(ynh_app_upstream_version)" > "$install_dir/version_static.txt"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
echo "$(ynh_app_upstream_version)" > "$install_dir/version_static.txt"
|
||||
fi
|
||||
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
|
||||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
|
||||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading system configurations related to $app..."
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_config_add_phpfpm
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_config_add_nginx
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_config_add_systemd
|
||||
|
||||
yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log"
|
||||
|
@ -56,21 +43,11 @@ yunohost service add $app --description="News feed reader and aggregator" --log=
|
|||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression "Updating configuration..."
|
||||
|
||||
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
|
||||
if ynh_app_upstream_version_changed
|
||||
then
|
||||
ynh_script_progression "Updating configuration..."
|
||||
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
|
||||
|
||||
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
|
||||
|
||||
ynh_script_progression "Upgrading the database..."
|
||||
|
||||
ynh_exec_as_app php$php_version $install_dir/update.php --update-schema=force-yes
|
||||
fi
|
||||
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/config.php"
|
||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app:$app "$install_dir/config.php"
|
||||
ynh_exec_as_app php$php_version $install_dir/update.php --update-schema=force-yes
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
Loading…
Add table
Reference in a new issue