mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
Merge d7ca2601b9
into ad16628d0a
This commit is contained in:
commit
4593417914
3 changed files with 53 additions and 48 deletions
|
@ -183,4 +183,4 @@ ynh_supervisor_action() {
|
||||||
fi
|
fi
|
||||||
ynh_clean_check_starting
|
ynh_clean_check_starting
|
||||||
fi
|
fi
|
||||||
}
|
}
|
|
@ -103,27 +103,45 @@ ynh_script_progression --message="Configuring a supervisor service..." --weight=
|
||||||
# Create a dedicated supervisor config
|
# Create a dedicated supervisor config
|
||||||
ynh_add_supervisor_config --service="${app}-horizon" --template=horizon.conf
|
ynh_add_supervisor_config --service="${app}-horizon" --template=horizon.conf
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PATCH PERMISSIONS for v0.11.5 versions and higher
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Patching permissions (for version 0.11.5 and newer)..." --weight=1
|
||||||
|
|
||||||
|
# Default configuration doesn't work
|
||||||
|
ynh_replace_string --match_string="'private' => 0700," --replace_string="'private' => 0750," --target_file=$install_dir/config/filesystems.php
|
||||||
|
|
||||||
|
# Repair permissions for files created after v0.11.5 and before this patch
|
||||||
|
if [ -d "$install_dir/public/storage/m/_v2/" ]; then
|
||||||
|
chmod 750 -R "$install_dir/public/storage/m/_v2/"* # all files subdirectories (picture folders) should be readable and executable. But if there is no picture, there is no /*/*
|
||||||
|
chmod 770 "$install_dir/public/storage/m/_v2/"* # users folders should be 770
|
||||||
|
chmod 770 "$install_dir/public/storage/m/_v2/" # this should be 770
|
||||||
|
chown -R :www-data "$install_dir/public/storage/m/_v2/" # Fix the mess following packaging v2 upgrade - and make sure proper group owner is set.
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DEPLOY
|
# DEPLOY
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Deploying..." --weight=1
|
ynh_script_progression --message="Deploying..." --weight=1
|
||||||
|
|
||||||
|
artisan="ynh_exec_as $app php$phpversion artisan"
|
||||||
|
|
||||||
pushd "$install_dir"
|
pushd "$install_dir"
|
||||||
php$phpversion artisan -n key:generate --force
|
$artisan -n key:generate --force
|
||||||
php$phpversion artisan horizon:install
|
$artisan horizon:install
|
||||||
php$phpversion artisan horizon:publish
|
$artisan horizon:publish
|
||||||
php$phpversion artisan passport:keys
|
$artisan passport:keys
|
||||||
php$phpversion artisan config:clear
|
$artisan config:clear
|
||||||
php$phpversion artisan config:cache
|
$artisan config:cache
|
||||||
php$phpversion artisan route:cache
|
$artisan route:cache
|
||||||
php$phpversion artisan view:cache
|
$artisan view:cache
|
||||||
php$phpversion artisan storage:link
|
$artisan storage:link
|
||||||
php$phpversion artisan migrate --force
|
$artisan migrate --force
|
||||||
php$phpversion artisan update
|
$artisan update
|
||||||
php$phpversion artisan horizon:purge
|
$artisan horizon:purge
|
||||||
php$phpversion artisan import:cities 2>/dev/null
|
$artisan import:cities 2>/dev/null
|
||||||
php$phpversion artisan instance:actor
|
$artisan instance:actor
|
||||||
php$phpversion artisan passport:client --personal <<< "\\n"
|
$artisan passport:client --personal <<< "\\n"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -144,22 +162,6 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1
|
||||||
ynh_use_logrotate --logfile="/var/log/$app/${app}-horizon.log"
|
ynh_use_logrotate --logfile="/var/log/$app/${app}-horizon.log"
|
||||||
ynh_use_logrotate --logfile="/var/www/$app/storage/logs/laravel.log" --specific_user=$app/www-data
|
ynh_use_logrotate --logfile="/var/www/$app/storage/logs/laravel.log" --specific_user=$app/www-data
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# PATCH PERMISSIONS for v0.11.5 versions and higher
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Patching permissions (for version 0.11.5 and newer)..." --weight=1
|
|
||||||
|
|
||||||
# Default configuration doesn't work
|
|
||||||
ynh_replace_string --match_string="'private' => 0700," --replace_string="'private' => 0750," --target_file=$install_dir/config/filesystems.php
|
|
||||||
|
|
||||||
# Repair permissions for files created after v0.11.5 and before this patch
|
|
||||||
if [ -d "$install_dir/public/storage/m/_v2/" ]; then
|
|
||||||
chmod 750 -R "$install_dir/public/storage/m/_v2/"* # all files subdirectories (picture folders) should be readable and executable. But if there is no picture, there is no /*/*
|
|
||||||
chmod 770 "$install_dir/public/storage/m/_v2/"* # users folders should be 770
|
|
||||||
chmod 770 "$install_dir/public/storage/m/_v2/" # this should be 770
|
|
||||||
chown -R :www-data "$install_dir/public/storage/m/_v2/" # Fix the mess following packaging v2 upgrade - and make sure proper group owner is set.
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
# INTEGRATE SERVICE IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -175,23 +175,26 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Deploying..."
|
ynh_script_progression --message="Deploying..."
|
||||||
|
|
||||||
|
artisan="ynh_exec_as $app php$phpversion artisan"
|
||||||
|
artisan_root="php$phpversion artisan"
|
||||||
|
|
||||||
pushd "$install_dir"
|
pushd "$install_dir"
|
||||||
php$phpversion artisan horizon:install
|
$artisan horizon:install
|
||||||
php$phpversion artisan horizon:publish
|
$artisan horizon:publish
|
||||||
php$phpversion artisan passport:keys --force
|
$artisan passport:keys --force
|
||||||
php$phpversion artisan config:clear
|
$artisan_root config:clear
|
||||||
php$phpversion artisan config:cache
|
$artisan config:cache
|
||||||
php$phpversion artisan route:clear
|
$artisan_root route:clear
|
||||||
php$phpversion artisan route:cache
|
$artisan route:cache
|
||||||
php$phpversion artisan view:clear
|
$artisan_root view:clear
|
||||||
php$phpversion artisan view:cache
|
$artisan view:cache
|
||||||
php$phpversion artisan storage:link
|
$artisan storage:link
|
||||||
php$phpversion artisan migrate --force
|
$artisan migrate --force
|
||||||
php$phpversion artisan update
|
$artisan update
|
||||||
php$phpversion artisan horizon:purge
|
$artisan horizon:purge
|
||||||
php$phpversion artisan import:cities 2>/dev/null
|
$artisan import:cities 2>/dev/null
|
||||||
php$phpversion artisan instance:actor
|
$artisan instance:actor
|
||||||
php$phpversion artisan passport:client --personal <<< "\\n"
|
$artisan passport:client --personal <<< "\\n"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue