mirror of
https://github.com/YunoHost-Apps/gogs_ynh.git
synced 2024-09-03 20:36:23 +02:00
Update change_url
This commit is contained in:
parent
795df0d2b1
commit
eb1dc82b7e
1 changed files with 7 additions and 24 deletions
|
@ -110,39 +110,22 @@ fi
|
|||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
REPO_PATH="/home/yunohost.app/$app/repositories"
|
||||
DATA_PATH="/home/yunohost.app/$app/data"
|
||||
|
||||
cp ../conf/app.ini "$final_path/custom/conf"
|
||||
cp ../conf/ldap.conf "$final_path/custom/conf/auth.d/ldap.conf"
|
||||
|
||||
if [ "$path_url" = "/" ]
|
||||
then
|
||||
ynh_replace_string --match_string="__URL__" --replace_string="$new_domain" --target_file="$final_path/custom/conf/app.ini"
|
||||
url="$new_domain"
|
||||
else
|
||||
ynh_replace_string --match_string="__URL__" --replace_string="$new_domain${new_path%/}" --target_file="$final_path/custom/conf/app.ini"
|
||||
url="$new_domain${new_path%/}"
|
||||
fi
|
||||
|
||||
ynh_replace_string --match_string="__REPOS_PATH__" --replace_string="$REPO_PATH" --target_file="$final_path/custom/conf/app.ini"
|
||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/custom/conf/app.ini"
|
||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$final_path/custom/conf/app.ini"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/custom/conf/app.ini"
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$new_domain" --target_file="$final_path/custom/conf/app.ini"
|
||||
ynh_replace_string --match_string="__KEY__" --replace_string="$key" --target_file="$final_path/custom/conf/app.ini"
|
||||
ynh_replace_string --match_string="__DATA_PATH__" --replace_string="$DATA_PATH" --target_file="$final_path/custom/conf/app.ini"
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/custom/conf/app.ini"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/custom/conf/app.ini"
|
||||
domain=$new_domain
|
||||
|
||||
if [[ "$is_public" = '1' ]]
|
||||
then
|
||||
ynh_replace_string --match_string="__PRIVATE_MODE__" --replace_string="false" --target_file="$final_path/custom/conf/app.ini"
|
||||
else
|
||||
ynh_replace_string --match_string="__PRIVATE_MODE__" --replace_string="true" --target_file="$final_path/custom/conf/app.ini"
|
||||
fi
|
||||
ynh_add_config --template="../conf/app.ini" --destination="$final_path/custom/conf/app.ini"
|
||||
|
||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/custom/conf/auth.d/ldap.conf"
|
||||
chmod 400 "$final_path/custom/conf/app.ini"
|
||||
chown $app:$app "$final_path/custom/conf/app.ini"
|
||||
|
||||
ynh_store_file_checksum --file="$final_path/custom/conf/app.ini"
|
||||
ynh_add_config --template="../conf/ldap.conf" --destination="$final_path/custom/conf/auth.d/ldap.conf"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
|
Loading…
Reference in a new issue