1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ttrss_ynh.git synced 2024-10-01 13:34:46 +02:00
This commit is contained in:
ericgaspar 2021-09-29 10:17:12 +02:00
parent 35406e5f4f
commit 22c46aacfc
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 9 additions and 38 deletions

View file

@ -1,7 +1,6 @@
SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/44c5d0feba35e4533a6ee9be178bf1e7621466b6.tar.gz SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/949e2ab4d283244594414fa09d100187865c0657.tar.gz
SOURCE_SUM=5743118587836e4e8376386ef54debaf2866888baeddb93cc12b47040996d836 SOURCE_SUM=06c82be7af611673b364ecca250a9c0fd6bf2516aa6fb1a948ac87c2436ad820
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=
SOURCE_EXTRACT=true SOURCE_EXTRACT=true

View file

@ -6,7 +6,7 @@
"en": "News feed (RSS/Atom) reader and aggregator.", "en": "News feed (RSS/Atom) reader and aggregator.",
"fr": "Lecteur de flux dactualité utilisant les protocoles RSS et Atom." "fr": "Lecteur de flux dactualité utilisant les protocoles RSS et Atom."
}, },
"version": "20200916~ynh5", "version": "20210916~ynh5",
"url": "http://tt-rss.org", "url": "http://tt-rss.org",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"maintainer": { "maintainer": {
@ -26,8 +26,7 @@
"install" : [ "install" : [
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain"
"example": "domain.org"
}, },
{ {
"name": "path", "name": "path",

View file

@ -36,8 +36,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=2 ynh_script_progression --message="Validating restoration parameters..." --weight=2
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \ test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path " || ynh_die --message="There is already a directory: $final_path "

View file

@ -94,31 +94,12 @@ ynh_system_user_create --username=$app --home_dir=$final_path
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
# if [ "$upgrade_type" == "UPGRADE_APP" ]
# then
# ynh_script_progression --message="Upgrading source files..." --weight=7
# # Create a temporary directory
# tmpdir="$(ynh_smart_mktemp --min_size=10)"
# # Download, check integrity, uncompress and patch the source from app.src
# ynh_setup_source --dest_dir="$tmpdir"
# # Backup the config file in the temp dir
# cp -a "$final_path/config.php" "$tmpdir/config.php"
# # Replace the old ttrss by the new one
# ynh_secure_remove --file="$final_path"
# mv "$tmpdir" "$final_path"
# ynh_secure_remove --file="$tmpdir"
# fi
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php"
fi fi
chmod 750 "$final_path" chmod 750 "$final_path"
@ -153,19 +134,13 @@ then
domain_path=https://$domain$path_url domain_path=https://$domain$path_url
ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php"
ynh_script_progression --message="Upgrading ttrss database..." --weight=2
ynh_exec_as $app php${phpversion} ${final_path}/update.php --update-schema
fi fi
chmod 400 "$final_path/config.php" chmod 400 "$final_path/config.php"
chown $app:$app "$final_path/config.php" chown $app:$app "$final_path/config.php"
#=================================================
# UPGRADE DATABASE
#=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading ttrss database..." --weight=2
ynh_exec_as $app php"${phpversion}" ${final_path}/update.php --update-schema
fi
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD