mirror of
https://framagit.org/YunoHost-Apps/gitea_ynh.git
synced 2025-09-03 02:28:30 +02:00
Fix linter
This commit is contained in:
@ -18,10 +18,9 @@ ynh_abort_if_errors
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
domain=$(ynh_app_setting_get --app $app --key domain)
|
||||
path_url=$(ynh_normalize_url_path --path_url $(ynh_app_setting_get --app $app --key path))
|
||||
dbpass=$(ynh_app_setting_get --app $app --key mysqlpwd)
|
||||
DB_PASSWORD=$(ynh_app_setting_get --app $app --key mysqlpwd)
|
||||
admin=$(ynh_app_setting_get --app $app --key adminusername)
|
||||
key=$(ynh_app_setting_get --app $app --key secret_key)
|
||||
is_public=$(ynh_app_setting_get --app $app --key is_public)
|
||||
port=$(ynh_app_setting_get --app $app --key web_port)
|
||||
upstream_version=$(ynh_app_setting_get --app $app --key upstream_version)
|
||||
|
||||
@ -56,7 +55,7 @@ ynh_handle_app_migration --migration_id=gogs --migration_list=gogs_migrations
|
||||
if [[ $migration_process -eq 1 ]]; then
|
||||
# Reload variables
|
||||
dbname=$app
|
||||
dbuser=$app
|
||||
db_user=$app
|
||||
final_path="/opt/$app"
|
||||
DATADIR="/home/$app"
|
||||
REPO_PATH="$DATADIR/repositories"
|
||||
@ -74,7 +73,7 @@ if [[ $migration_process -eq 1 ]]; then
|
||||
|
||||
# Restore authentication from SQL database
|
||||
ynh_replace_string --match_string __APP__ --replace_string "$app" --target_file ../conf/login_source.sql
|
||||
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql
|
||||
ynh_mysql_connect_as "$db_user" "$DB_PASSWORD" "$dbname" < ../conf/login_source.sql
|
||||
|
||||
# Fix hooks
|
||||
if [[ -e $REPO_PATH ]];then
|
||||
@ -224,11 +223,7 @@ if ! ynh_permission_exists --permission admin; then
|
||||
ynh_permission_create --permission 'admin' --allowed "$admin"
|
||||
# Update ldap config
|
||||
ynh_replace_string --match_string "__APP__" --replace_string "$app" --target_file ../conf/login_source.sql
|
||||
ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" < ../conf/login_source.sql
|
||||
fi
|
||||
if [ "$is_public" == '1' ];
|
||||
then
|
||||
ynh_permission_update --permission "main" --add "visitors"
|
||||
ynh_mysql_connect_as "$db_user" "$DB_PASSWORD" "$dbname" < ../conf/login_source.sql
|
||||
fi
|
||||
|
||||
# Add gitea to YunoHost's monitored services
|
||||
|
Reference in New Issue
Block a user