1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/aeneria_ynh.git synced 2024-09-03 18:06:15 +02:00
This commit is contained in:
Éric Gaspar 2023-10-28 15:44:44 +02:00
parent 8d1112a98f
commit fb738b8928
3 changed files with 4 additions and 10 deletions

View file

@ -45,8 +45,6 @@ ynh_add_fpm_config
#================================================= #=================================================
ynh_script_progression --message="Configuring aeneria..." --weight=1 ynh_script_progression --message="Configuring aeneria..." --weight=1
aeneria_conf="$install_dir/.env"
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" ynh_add_config --template="../conf/.env" --destination="$install_dir/.env"
# Restrict rights to aeneria user only # Restrict rights to aeneria user only
@ -60,7 +58,6 @@ ynh_script_progression --message="Installing aeneria..." --weight=1
# Install aeneria # Install aeneria
pushd $install_dir pushd $install_dir
ynh_exec_as $app php$phpversion bin/console aeneria:install "$app" -n ynh_exec_as $app php$phpversion bin/console aeneria:install "$app" -n
# Create admin user # Create admin user
mail=$(ynh_user_get_info --username="$admin" --key='mail') mail=$(ynh_user_get_info --username="$admin" --key='mail')
ynh_exec_as $app php$phpversion bin/console aeneria:user:add "$mail" "$(ynh_string_random)" -n ynh_exec_as $app php$phpversion bin/console aeneria:user:add "$mail" "$(ynh_string_random)" -n

View file

@ -37,9 +37,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config
ynh_restore_file --origin_path="/etc/cron.d/$app" ynh_restore_file --origin_path="/etc/cron.d/$app"
#================================================= #=================================================

View file

@ -23,7 +23,7 @@ upgrade_type=$(ynh_check_app_version_changed)
ynh_script_progression --message="Ensuring downward compatibility..." ynh_script_progression --message="Ensuring downward compatibility..."
# If minutes or hour do not exist, create them # If minutes or hour do not exist, create them
if [ -z "${minutes:-}" ] || [ -z "$hour" ]; then if [ -z "${minutes:-}" ] || [ -z "${hour:-}" ]; then
# Generate random running schedule, and save $hour and $minutes as app parameters # Generate random running schedule, and save $hour and $minutes as app parameters
generate_random_minutes_hour generate_random_minutes_hour
fi fi
@ -68,7 +68,7 @@ ynh_add_nginx_config
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
ynh_add_config --template="../conf/aeneria.cron" --destination="/etc/cron.d/$app" ynh_add_config --template="aeneria.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"
@ -77,7 +77,7 @@ chmod 644 "/etc/cron.d/$app"
#================================================= #=================================================
# CONFIGURE AENERIA # CONFIGURE AENERIA
#================================================= #=================================================
ynh_script_progression --message="Configuring aeneria..." --weight=1 ynh_script_progression --message="Configuring $app..." --weight=1
ynh_add_config --template=".env" --destination="$install_dir/.env" ynh_add_config --template=".env" --destination="$install_dir/.env"
@ -87,7 +87,7 @@ chmod 600 "$install_dir/.env"
#================================================= #=================================================
# UPGRADE AENERIA # UPGRADE AENERIA
#================================================= #=================================================
ynh_script_progression --message="Upgrading aeneria..." --weight=1 ynh_script_progression --message="Upgrading $app..." --weight=1
# Install dependencies and aeneria # Install dependencies and aeneria
pushd $install_dir pushd $install_dir