1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/koel_ynh.git synced 2024-09-03 19:35:54 +02:00
koel_ynh/scripts/install
Éric Gaspar 3c84842acd cleaning
2024-09-03 13:02:05 +02:00

55 lines
1.7 KiB
Bash
Executable file

#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
ynh_app_setting_set --key=php_memory_limit --value=512M
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."
ynh_setup_source --dest_dir="$install_dir"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================
ynh_script_progression "Initializing multimedia directories..."
ynh_multimedia_build_main_dir
ynh_multimedia_addfolder --source_dir="$data_dir" --dest_dir="$app"
ynh_multimedia_addaccess $app
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration..."
app_key=$(ynh_string_random --length=32)
ynh_app_setting_set --key="app_key" --value="$app_key"
ynh_config_add --template="env" --destination="$install_dir/.env"
#=================================================
# INITIALIZE THE APP
#=================================================
ynh_script_progression "Initializing $app..."
pushd $install_dir
ynh_exec_as_app php$php_version artisan koel:init --no-assets --no-interaction --quiet
popd
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression "Adding system configurations related to $app..."
ynh_config_add_phpfpm
ynh_config_add_nginx
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Installation of $app completed"