mirror of
https://github.com/YunoHost-Apps/invoiceninja5_ynh.git
synced 2024-09-03 19:26:23 +02:00
cleaning
This commit is contained in:
parent
6da810dcd9
commit
bad51ca31e
2 changed files with 17 additions and 31 deletions
|
@ -22,13 +22,10 @@ email="$(ynh_user_get_info --username=$admin --key=mail)"
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# STORE SETTINGS FROM MANIFEST
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Storing installation settings..."
|
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=api_secret --value=$api_secret
|
ynh_app_setting_set --app=$app --key=api_secret --value=$api_secret
|
||||||
ynh_app_setting_set --app=$app --key=app_key --value=$app_key
|
ynh_app_setting_set --app=$app --key=app_key --value=$app_key
|
||||||
ynh_app_setting_set --app=$app --key=phantomjs_key --value=$phantomjs_key
|
ynh_app_setting_set --app=$app --key=phantomjs_key --value=$phantomjs_key
|
||||||
ynh_app_setting_set --app=$app --key=email_fullname --value="$email_fullname"
|
|
||||||
ynh_app_setting_set --app=$app --key=email --value=$email
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -37,6 +34,7 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -50,6 +48,10 @@ ynh_add_fpm_config
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
|
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
|
||||||
|
chown root: "/etc/cron.d/$app"
|
||||||
|
chmod 644 "/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -84,15 +86,6 @@ chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ADD A CRON JOB
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Adding a cron job..." --weight=1
|
|
||||||
|
|
||||||
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
|
|
||||||
chown root: "/etc/cron.d/$app"
|
|
||||||
chmod 644 "/etc/cron.d/$app"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -15,6 +15,18 @@ source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Delete deprecated `firstname`/`lastname` 'null' settings. See upstream https://github.com/YunoHost/yunohost/pull/1516
|
||||||
|
ynh_app_setting_delete --app=$app --key=email_firstname
|
||||||
|
ynh_app_setting_delete --app=$app --key=email_lastname
|
||||||
|
|
||||||
|
# Retrieve admin user settings
|
||||||
|
email_fullname="$(ynh_user_get_info --username=$admin --key=fullname)"
|
||||||
|
email="$(ynh_user_get_info --username=$admin --key=mail)" # include as admin's email address is also subject to change
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -45,25 +57,6 @@ ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
|
||||||
chown root: "/etc/cron.d/$app"
|
chown root: "/etc/cron.d/$app"
|
||||||
chmod 644 "/etc/cron.d/$app"
|
chmod 644 "/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPDATE APP SETTINGS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|
||||||
then
|
|
||||||
# Delete deprecated `firstname`/`lastname` 'null' settings. See upstream https://github.com/YunoHost/yunohost/pull/1516
|
|
||||||
ynh_app_setting_delete --app=$app --key=email_firstname
|
|
||||||
ynh_app_setting_delete --app=$app --key=email_lastname
|
|
||||||
|
|
||||||
# Retrieve admin user settings
|
|
||||||
email_fullname="$(ynh_user_get_info --username=$admin --key=fullname)"
|
|
||||||
email="$(ynh_user_get_info --username=$admin --key=mail)" # include as admin's email address is also subject to change
|
|
||||||
|
|
||||||
# Set
|
|
||||||
ynh_app_setting_set --app=$app --key=email_fullname --value="$email_fullname"
|
|
||||||
ynh_app_setting_set --app=$app --key=email --value=$email
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue