1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ttrss_ynh.git synced 2024-10-01 13:34:46 +02:00
ttrss_ynh/scripts/install

64 lines
2 KiB
Text
Raw Normal View History

#!/bin/bash
source _common.sh
2017-04-20 21:31:08 +02:00
source /usr/share/yunohost/helpers
ynh_app_setting_set --key=php_upload_max_filesize --value=10M
2017-08-27 14:42:28 +02:00
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."
2017-08-27 14:42:28 +02:00
ynh_setup_source --dest_dir="$install_dir"
echo "$(ynh_app_upstream_version)" > "$install_dir/version_static.txt"
2017-08-27 14:42:28 +02:00
#=================================================
# SYSTEM CONFIGURATION
2017-08-27 14:42:28 +02:00
#=================================================
ynh_script_progression "Adding system configurations related to $app..."
2017-08-27 14:42:28 +02:00
2020-08-14 12:29:45 +02:00
# 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"
2017-08-27 14:42:28 +02:00
#=================================================
# SPECIFIC SETUP
#=================================================
2021-05-18 09:26:51 +02:00
# ADD A CONFIGURATION
2017-08-27 14:42:28 +02:00
#=================================================
ynh_script_progression "Adding $app's configuration..."
2017-08-27 14:42:28 +02:00
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
2017-08-27 14:42:28 +02:00
#=================================================
# INITIALIZE DATABASE
#=================================================
ynh_script_progression "Initializing database..."
2017-08-27 14:42:28 +02:00
ynh_psql_db_shell \
Testing (#160) * Auto-update README * Upgrade to upstream * Auto-update README * Bullseye (#141) * Fix * Fix * Auto-update README Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Upgrade * Auto-update README * Auto-update README * Upgrade to upstream * Auto-update README * PHP * Auto-update README * Update manifest.json * Auto-update README * Update config * Fix * Auto-update README * update * Auto-update README * Version 2 (#148) * v2 * v2 * Auto-update README * Fix * Auto-update README * fix --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Update tests.toml * Delete check_process * Update restore * Update remove * Update install * Update upgrade * Fix * Update upgrade * Update manifest.toml * Update manifest.toml * data_migration * fix * Fix * Update manifest.toml * Auto-update README * Update manifest.toml * Update manifest.toml * Auto-update README * Update tests.toml * auto updater * Update manifest.toml * Auto-update README * remove data migration * update git repo * Auto-update README * Update manifest.toml * Update manifest.toml * Auto-update README * update to upstream * Auto-update README * fix * Auto-update README * Update manifest.toml * Update manifest.toml * Auto-update README * Update manifest.toml * Auto-update README * PostgreSQL (#150) * switch to PHP * Update install * Update _common.sh * Update _common.sh * Update app.src * Update manifest.json * Auto-update README * Fix * Update remove * Update _common.sh * Update app.src * Fix * Remove cron * Update install * Update change_url * Update systemd.service * Update install * Update DESCRIPTION.md * Auto-update README * Fix * Update manifest.json * Update restore * Update app.src * Create migration * v2 * v2 * Auto-update README * Fix * Auto-update README * fix * fix * fix * Update restore * data_migration * Revert "data_migration" This reverts commit 1aea23fb527ae3dade359d4e0b553cd87d10442a. * fix * fix * Update manifest.toml * Update manifest.toml * Update manifest.toml * Auto-update README * fix * Update manifest.toml * Update manifest.toml * Auto-update README * Create PRE_UPGRADE_fr.md * fix * Auto-update README * Auto-update README * Update manifest.toml * Auto-update README --------- Co-authored-by: Yunohost-Bot <> Co-authored-by: yunohost-bot <yunohost@yunohost.org> --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org>
2023-12-05 20:36:42 +01:00
< "$install_dir/schema/ttrss_schema_pgsql.sql"
ynh_exec_as_app php$php_version $install_dir/update.php --update-schema=force-yes
2021-05-18 09:26:51 +02:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression "Starting $app's systemd service..."
2021-05-18 09:26:51 +02:00
# Start a systemd service
ynh_systemctl --service=$app --action="start" --log_path="systemd"
2021-05-18 09:26:51 +02:00
2019-05-01 20:35:48 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2017-08-27 14:42:28 +02:00
ynh_script_progression "Installation of $app completed"