mirror of
https://github.com/YunoHost-Apps/ttrss_ynh.git
synced 2024-10-01 13:34:46 +02:00
fix
This commit is contained in:
parent
cd9414150c
commit
844d3175c8
4 changed files with 33 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/9d3c79498368fa99cfde684c759a1c40825aaaa9.tar.gz
|
SOURCE_URL=https://git.tt-rss.org/fox/tt-rss/archive/44c5d0feba35e4533a6ee9be178bf1e7621466b6.tar.gz
|
||||||
SOURCE_SUM=cb5a39a61f6319734606f06fafbb0eb60aa488cdc911ec84ee6738da533124cb
|
SOURCE_SUM=5743118587836e4e8376386ef54debaf2866888baeddb93cc12b47040996d836
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"email": ""
|
"email": ""
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.1.7"
|
"yunohost": ">= 4.2.4"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -63,7 +63,6 @@ db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
db_user=$db_name
|
db_user=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -147,9 +146,9 @@ ynh_systemd_action --service_name=$app --action="start"
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
# ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/public.php,/api,/opml.php?op=publish"
|
# ynh_app_setting_set --app=$app --key=skipped_uris --value="/public.php,/api,/opml.php?op=publish"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
|
@ -71,6 +71,13 @@ if [ -z "$db_name" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cleaning legacy permissions
|
||||||
|
if ynh_legacy_permissions_exists; then
|
||||||
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
|
fi
|
||||||
|
|
||||||
# Do not remove the file before the backup, to not fail the backup.
|
# Do not remove the file before the backup, to not fail the backup.
|
||||||
# Remove old cron job
|
# Remove old cron job
|
||||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||||
|
@ -87,23 +94,31 @@ 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=7
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Create a temporary directory
|
|
||||||
tmpdir="$(ynh_smart_mktemp --min_size=10)"
|
|
||||||
|
|
||||||
# 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="$tmpdir"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
# 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
|
fi
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
|
|
Loading…
Add table
Reference in a new issue