1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/castopod_ynh.git synced 2024-09-03 18:16:14 +02:00
This commit is contained in:
ericgaspar 2021-04-20 18:36:16 +02:00
parent 9b05a14cba
commit e676c3be93
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 14 additions and 3 deletions

View file

@ -25,7 +25,6 @@ path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC
admin=$YNH_APP_ARG_ADMIN
password=$YNH_APP_ARG_PASSWORD
email=$(ynh_user_get_info --username=$admin --key=mail)
app=$YNH_APP_INSTANCE_NAME
@ -124,6 +123,8 @@ ynh_systemd_action --service_name=nginx --action=reload
# Installation with curl
ynh_script_progression --message="Finalizing installation..." --weight=1
email=$(ynh_user_get_info --username=$admin --key=mail)
ynh_local_curl "/cp-install"
ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password"

View file

@ -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)
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
#=================================================
# CHECK VERSION
@ -101,6 +102,13 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies"
#=================================================
# CONFIGURE CASTOPOD
#=================================================
ynh_script_progression --message="Configuring Castopod..." --weight=1
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
#=================================================
# SETUP CRON
#=================================================
@ -115,8 +123,10 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#=================================================
# Set permissions to app files
chown -R $app:$app $final_path
chmod 600 $final_path/.env
chown -R $app:root $final_path
chown -R www-data:www-data $final_path/writable
chown -R www-data:www-data $final_path/public/media
#chmod 600 $final_path/.env
#=================================================
# RELOAD NGINX