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:
parent
f3afca2a85
commit
1f6d296135
2 changed files with 25 additions and 24 deletions
|
@ -30,7 +30,6 @@ admin=$YNH_APP_ARG_ADMIN
|
|||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
registration=$YNH_APP_ARG_REGISTRATION
|
||||
random_key=$(ynh_string_random 32)
|
||||
|
||||
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=is_public --value=$is_public
|
||||
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
|
||||
|
||||
#=================================================
|
||||
|
@ -75,6 +73,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
|
||||
# Clone the latest version
|
||||
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
|
||||
|
||||
#=================================================
|
||||
|
@ -112,6 +111,8 @@ local_conf="$final_path/config/packages/local.yaml"
|
|||
# Configure registration
|
||||
cp ../conf/local.yaml $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 ]
|
||||
then
|
||||
ynh_replace_string --match_string="__REGISTRATION__" --replace_string="true" --target_file="$local_conf"
|
||||
|
|
Loading…
Add table
Reference in a new issue