1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kimai2_ynh.git synced 2024-09-03 19:26:26 +02:00

Remove database variable from install

This commit is contained in:
Amo 2021-05-27 11:51:22 +05:30
parent f3afca2a85
commit 1f6d296135
2 changed files with 25 additions and 24 deletions

View file

@ -30,7 +30,6 @@ admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
registration=$YNH_APP_ARG_REGISTRATION registration=$YNH_APP_ARG_REGISTRATION
random_key=$(ynh_string_random 32) random_key=$(ynh_string_random 32)
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
@ -54,7 +53,6 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=registration --value=$registration ynh_app_setting_set --app=$app --key=registration --value=$registration
ynh_app_setting_set --app=$app --key=database --value=$database
ynh_app_setting_set --app=$app --key=random_key --value=$random_key ynh_app_setting_set --app=$app --key=random_key --value=$random_key
#================================================= #=================================================
@ -75,6 +73,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Clone the latest version # Clone the latest version
latest_tag=$(curl -s https://api.github.com/repos/kevinpapst/kimai2/releases/latest | grep 'tag_name' | cut -d\" -f4) latest_tag=$(curl -s https://api.github.com/repos/kevinpapst/kimai2/releases/latest | grep 'tag_name' | cut -d\" -f4)
git clone -b $latest_tag --depth 1 https://github.com/kevinpapst/kimai2.git $final_path git clone -b $latest_tag --depth 1 https://github.com/kevinpapst/kimai2.git $final_path
#================================================= #=================================================
@ -112,6 +111,8 @@ local_conf="$final_path/config/packages/local.yaml"
# Configure registration # Configure registration
cp ../conf/local.yaml $local_conf cp ../conf/local.yaml $local_conf
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$local_conf" ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$local_conf"
# Registration should be allowed or not
if [ $registration -eq 1 ] if [ $registration -eq 1 ]
then then
ynh_replace_string --match_string="__REGISTRATION__" --replace_string="true" --target_file="$local_conf" ynh_replace_string --match_string="__REGISTRATION__" --replace_string="true" --target_file="$local_conf"

View file

@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME app= $YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)