Skip to content

Commit

Permalink
Merge pull request #6 from YunoHost-Apps/testing
Browse files Browse the repository at this point in the history
Fix timezone
  • Loading branch information
ericgaspar authored Oct 5, 2021
2 parents 47688c4 + f029e52 commit b4df7fc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -428,3 +428,4 @@ php_admin_value[max_execution_time] = 900
; php_admin_value[max_input_time] = 300
php_admin_value[memory_limit] = 512M
; php_admin_flag[short_open_tag] = On
php_admin_value[date.timezone] = __TIMEZONE__
1 change: 1 addition & 0 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
timezone="$(cat /etc/timezone)"

app=$YNH_APP_INSTANCE_NAME

Expand Down
9 changes: 9 additions & 0 deletions scripts/restore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
timezone="$(cat /etc/timezone)"

#=================================================
# CHECK IF THE APP CAN BE RESTORED
Expand Down Expand Up @@ -71,13 +72,20 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"

chmod -R g+w $final_path/app/config/
chmod -R g+w $final_path/media/files/
chmod -R g+w $final_path/media/images/
chmod -R g+w $final_path/translations/

#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1

ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"

ynh_add_fpm_config --package="$extra_php_dependencies"

#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
Expand All @@ -93,6 +101,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./
ynh_script_progression --message="Restoring various files..." --weight=1

ynh_restore_file --origin_path="/etc/cron.d/$app"
chmod 644 "/etc/cron.d/$app"

#=================================================
# GENERIC FINALIZATION
Expand Down
1 change: 1 addition & 0 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
timezone="$(cat /etc/timezone)"

#=================================================
# CHECK VERSION
Expand Down

0 comments on commit b4df7fc

Please sign in to comment.