1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zusam_ynh.git synced 2024-09-03 18:05:54 +02:00

We'll take care of language later

This commit is contained in:
dragondaddy 2023-08-10 01:28:14 +02:00
parent c24d34ee23
commit 6526eeba49
2 changed files with 11 additions and 16 deletions

View file

@ -32,12 +32,13 @@ ram.runtime = "50M"
help.fr = "Zusam ne peut être installé que dans un domaine racine ou un sous-domaine" help.fr = "Zusam ne peut être installé que dans un domaine racine ou un sous-domaine"
type = "domain" type = "domain"
[install.language] ### We'll figure this out later
ask.en = "Choose the application language" # [install.language]
ask.fr = "Choisissez la langue de l'application" # ask.en = "Choose the application language"
type = "select" # ask.fr = "Choisissez la langue de l'application"
choices = ["fr", "en"] # type = "select"
default = "fr" # choices = ["fr", "en"]
# default = "fr"
[install.first_user] [install.first_user]
ask.en = "Choose the Zusam's first user" ask.en = "Choose the Zusam's first user"

View file

@ -42,19 +42,12 @@ ynh_script_progression --message="Setting up source files..." --weight=1
# Download, check integrity, uncompress and patch the source # Download, check integrity, uncompress and patch the source
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
# Let's copy the webapp in the public directory # Let's copy the webapp in the public directory
cp -R $install_dir/app/dist/* $install_dir/public/ cp -R $install_dir/app/dist/* $install_dir/public/
ynh_script_progression --message="Pulling in external libraries with Composer..." ynh_script_progression --message="Pulling in external libraries with Composer..."
#pushd $install_dir/api ynh_install_composer -c "2.4.2" -w $install_dir/api/
# export COMPOSER_ALLOW_SUPERUSER=1
# export COMPOSER_HOME=$install_dir/api
# sudo -u $app /usr/bin/php$phpversion bin/composer install
#popd
ynh_install_composer -c "2.4.2" -w $install_dir/api/
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
@ -80,7 +73,8 @@ ynh_add_nginx_config
#================================================= #=================================================
# ynh_script_progression --message="Adding a configuration file..." --weight=1 # ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/sample.env" --destination="$install_dir/api/.env" # We'll take care of language later
# ynh_add_config --template="../conf/sample.env" --destination="$install_dir/api/.env"
chmod 600 "$install_dir/api/.env" chmod 600 "$install_dir/api/.env"
chown $app:www-data "$install_dir/api/.env" chown $app:www-data "$install_dir/api/.env"
@ -90,7 +84,7 @@ chown $app:www-data "$install_dir/api/.env"
#================================================= #=================================================
ynh_script_progression --message="Initialiazing the database..." --weight=1 ynh_script_progression --message="Initialiazing the database..." --weight=1
/usr/bin/php$phpversion $install_dir/api/bin/console zusam:init $email $first_group $first_user_pass /usr/bin/php$phpversion $install_dir/api/bin/console zusam:init $email "$first_group" $first_user_pass
chown -R $app:www-data $install_dir chown -R $app:www-data $install_dir