mirror of
https://github.com/YunoHost-Apps/gogs_ynh.git
synced 2024-09-03 20:36:23 +02:00
Update install
This commit is contained in:
parent
e0194b9496
commit
8ef998c9cf
1 changed files with 39 additions and 16 deletions
|
@ -121,35 +121,58 @@ mkdir -p "$datadir/data/attachments"
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
cp ../conf/app.ini "$final_path/custom/conf"
|
|
||||||
|
|
||||||
if [ "$path_url" = "/" ]
|
if [ "$path_url" = "/" ]
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string="__URL__" --replace_string="$domain" --target_file="$final_path/custom/conf/app.ini"
|
url="$domain"
|
||||||
else
|
else
|
||||||
ynh_replace_string --match_string="__URL__" --replace_string="$domain${path_url}" --target_file="$final_path/custom/conf/app.ini"
|
url="$domain${path_url}"
|
||||||
fi
|
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="$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"
|
|
||||||
|
|
||||||
if [[ "$is_public" = '1' ]]
|
if [[ "$is_public" = '1' ]]
|
||||||
then
|
then
|
||||||
ynh_replace_string --match_string="__PRIVATE_MODE__" --replace_string="false" --target_file="$final_path/custom/conf/app.ini"
|
private_mode="false"
|
||||||
else
|
else
|
||||||
ynh_replace_string --match_string="__PRIVATE_MODE__" --replace_string="true" --target_file="$final_path/custom/conf/app.ini"
|
private_mode="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ynh_add_config --template="../conf/app.ini" --destination="$final_path/custom/conf/app.ini"
|
||||||
|
|
||||||
|
chmod 400 "$final_path/custom/conf/app.ini"
|
||||||
|
chown $app:$app "$final_path/custom/conf/app.ini"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# cp ../conf/app.ini "$final_path/custom/conf"
|
||||||
|
|
||||||
|
# if [ "$path_url" = "/" ]
|
||||||
|
# then
|
||||||
|
# ynh_replace_string --match_string="__URL__" --replace_string="$domain" --target_file="$final_path/custom/conf/app.ini"
|
||||||
|
# else
|
||||||
|
# ynh_replace_string --match_string="__URL__" --replace_string="$domain${path_url}" --target_file="$final_path/custom/conf/app.ini"
|
||||||
|
# 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="$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"
|
||||||
|
|
||||||
|
# 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/ldap.conf" --destination="$final_path/custom/conf/auth.d/ldap.conf"
|
ynh_add_config --template="../conf/ldap.conf" --destination="$final_path/custom/conf/auth.d/ldap.conf"
|
||||||
|
|
||||||
ynh_store_file_checksum --file="$final_path/custom/conf/app.ini"
|
#ynh_store_file_checksum --file="$final_path/custom/conf/app.ini"
|
||||||
|
|
||||||
# Configure init script
|
# Configure init script
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
Loading…
Add table
Reference in a new issue