diff --git a/README.md b/README.md index 6bcd35b..10923fc 100644 --- a/README.md +++ b/README.md @@ -68,12 +68,6 @@ Host domain.tld port 2222 # change this with the port you use ``` -You will also need to add the `gitea` user in the ssh permission with this command: - -``` -sudo adduser gitea ssh.app -``` - ### Architecture This package is compatible with amd64, i386 and arm. The package will try to detect it with the command uname -m and fail if it can't detect the architecture. If that happens please open an issue describing your hardware and the result of the command `uname -m`. diff --git a/scripts/install b/scripts/install index 2fc9231..bf79e38 100644 --- a/scripts/install +++ b/scripts/install @@ -66,6 +66,8 @@ ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass" # Add users ynh_script_progression --message="Configuring system user..." ynh_system_user_create --username=$app --home_dir=/home/$app --use_shell +# Add ssh permission for user gitea +adduser gitea ssh.app # create needed directories create_dir diff --git a/scripts/upgrade b/scripts/upgrade index 8900009..0055ee3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -230,6 +230,9 @@ fi ynh_script_progression --message="Register gitea service..." yunohost service add "$app" --log "/var/log/$app/gitea.log" +# Add ssh permission for user gitea +adduser gitea ssh.app + # Set permissions ynh_script_progression --message="Protecting directory" set_permission