1
0
Fork 0
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:
ericgaspar 2021-02-08 08:58:17 +01:00
parent 84836ff3d3
commit 6b12c64126
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 6 additions and 21 deletions

View file

@ -101,12 +101,6 @@ then
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# ...
#=================================================
#=================================================
# RELOAD NGINX
#=================================================

View file

@ -26,8 +26,7 @@ path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC
random_key=$(ynh_string_random --length=32)
email=$(ynh_user_get_info $admin 'mail')
email=$(ynh_user_get_info --username=$admin --key=mail)
app=$YNH_APP_INSTANCE_NAME
@ -198,8 +197,6 @@ ynh_script_progression --message="Configuring permissions..."
# Make app public if necessary
if [ $is_public -eq 1 ]
then
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission="main" --add="visitors"
fi

View file

@ -25,7 +25,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
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 $admin 'mail')
email=$(ynh_user_get_info --username=$admin --key=mail)
#=================================================
# CHECK VERSION
@ -104,18 +104,15 @@ then
cp -a "$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"
# Restore the config file
cp -a "$tmpdir/storage/upload/" "$final_path/storage/upload/"
cp -a "$tmpdir/storage/export/" "$final_path/storage/export/"
cp -a "$tmpdir/.env" "$final_path/.env"
cp -a "$tmpdir/.env" "$final_path/.env"
# Remove temporary directory
ynh_secure_remove --file="$tmpdir"
fi
#=================================================
@ -157,7 +154,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
ynh_script_progression --message="Updating PHP dependencies..."
chown -R $app: "$final_path"
chown -R $app: $final_path
ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$final_path"
@ -199,15 +196,12 @@ ynh_store_file_checksum --file="$config"
ynh_script_progression --message="Deploying..."
pushd "$final_path"
rm -rf bootstrap/cache/*
ynh_secure_remove --file="bootstrap/cache/*"
php$phpversion artisan cache:clear
php$phpversion artisan migrate --seed
php$phpversion artisan firefly-iii:upgrade-database
php$phpversion artisan passport:install
php$phpversion artisan cache:clear
popd
#=================================================
@ -227,7 +221,7 @@ ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files
chown -R $app: $final_path
chmod -R 775 ${final_path}/storage
chmod -R 775 $final_path/storage
#=================================================
# SETUP A CRON