mirror of
https://github.com/YunoHost-Apps/firefly-iii_ynh.git
synced 2024-09-03 18:36:13 +02:00
Cleaning up
This commit is contained in:
parent
357bdbdae0
commit
5faee4258f
4 changed files with 7 additions and 41 deletions
|
@ -27,7 +27,7 @@ DEFAULT_LOCALE=equal
|
|||
# Change this value to your preferred time zone.
|
||||
# Example: Europe/Amsterdam
|
||||
# For a list of supported time zones, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
TZ=Europe/Amsterdam
|
||||
TZ=__TIMEZONE__
|
||||
|
||||
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
|
||||
# Set it to ** and reverse proxies work just fine.
|
||||
|
@ -62,7 +62,7 @@ DB_CONNECTION=mysql
|
|||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=__DB_NAME__
|
||||
DB_USERNAME=__DB_NAME__
|
||||
DB_USERNAME=__DB_USER__
|
||||
DB_PASSWORD=__DB_PWD__
|
||||
|
||||
# MySQL supports SSL. You can configure it here.
|
||||
|
|
0
doc/DESCRIPTION.md
Normal file
0
doc/DESCRIPTION.md
Normal file
|
@ -9,7 +9,7 @@
|
|||
YNH_PHP_VERSION="8.0"
|
||||
|
||||
# Composer version
|
||||
YNH_COMPOSER_VERSION="2.0.13"
|
||||
YNH_COMPOSER_VERSION="2.3.3"
|
||||
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-ldap"
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
|||
random_key=$(ynh_app_setting_get --app=$app --key=random_key)
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
phpversion=$YNH_PHP_VERSION
|
||||
timezone="$(cat /etc/timezone)"
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -85,50 +86,16 @@ ynh_script_progression --message="Making sure dedicated system user exists..."
|
|||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ];
|
||||
then
|
||||
pushd "$final_path"
|
||||
ynh_setup_source --dest_dir=$final_path
|
||||
ynh_secure_remove --file="$final_path/bootstrap/cache/*"
|
||||
ynh_secure_remove --file="$final_path/vendor/"
|
||||
popd
|
||||
|
||||
else
|
||||
ynh_script_progression --message="Upgrading source files..."
|
||||
# Create a temporary directory
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
||||
# Backup the config file in the temp dir
|
||||
mkdir -p "$tmpdir/storage/upload"
|
||||
mkdir -p "$tmpdir/storage/export"
|
||||
mkdir -p "$final_path/storage/upload/"
|
||||
mkdir -p "$final_path/storage/export/"
|
||||
cp -aT "$final_path/storage/upload" "$tmpdir/storage/upload/$"
|
||||
cp -a "$final_path/.env" "$tmpdir/.env"
|
||||
cp -aT "$final_path/storage/export" "$tmpdir/storage/export/"
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir=$final_path
|
||||
ynh_secure_remove bootstrap/cache/*
|
||||
|
||||
# Restore the config file and data
|
||||
mkdir -p "$final_path/storage/upload/"
|
||||
mkdir -p "$final_path/storage/export/"
|
||||
cp -aT "$tmpdir/storage/upload" "$final_path/storage/upload"
|
||||
cp -aT "$tmpdir/storage/export" "$final_path/storage/export"
|
||||
cp -a "$tmpdir/.env" "$final_path/.env"
|
||||
# Remove temporary directory
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env $final_path/storage/upload $final_path/storage/export"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
@ -159,7 +126,6 @@ ynh_add_fpm_config --phpversion=$phpversion
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating PHP dependencies..."
|
||||
|
||||
chown -R $app $final_path
|
||||
ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$final_path"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue