diff --git a/conf/gunicorn.conf.py b/conf/gunicorn.conf.py index cb40c98..162b84c 100644 --- a/conf/gunicorn.conf.py +++ b/conf/gunicorn.conf.py @@ -17,4 +17,4 @@ accesslog = '__LOG_FILE__' errorlog = '__LOG_FILE__' # https://docs.gunicorn.org/en/latest/settings.html#pidfile -pidfile = '__DATA_DIR__/gunicorn.pid' # /home/yunohost.app/$app/gunicorn.pid +pidfile = '__INSTALL_DIR__/gunicorn.pid' diff --git a/manifest.toml b/manifest.toml index 3ddc348..a175245 100644 --- a/manifest.toml +++ b/manifest.toml @@ -37,8 +37,16 @@ ram.runtime = "50M" type = "group" default = "visitors" + [install.password] + ask.en = "Password that you will need to upload your code on YunoHost" + ask.fr = "Le mot de passe que vous utiliserez pour téléverser votre code sur Yunohost" + type = "password" + [resources] [resources.system_user] + allow_sftp = true + allow_ssh = false + home = "/home/yunohost.app/__APP__" # This will provision/deprovision a unix system user [resources.install_dir] @@ -46,6 +54,7 @@ ram.runtime = "50M" [resources.data_dir] # This will create/remove the data dir as /home/yunohost.app/$app # and store the corresponding setting $data_dir + dir = "/home/yunohost.app/__APP__" [resources.permissions] # This will configure SSOwat permission for $domain/$path/ diff --git a/scripts/install b/scripts/install index d428c24..d9a2a97 100755 --- a/scripts/install +++ b/scripts/install @@ -69,6 +69,9 @@ ynh_add_config --template="gunicorn.conf.py" --destination="$install_dir/gunicor mkdir -p "$data_dir/FastAPIAppFolder" ynh_add_config --template="__init__.py" --destination="$data_dir/FastAPIAppFolder/__init__.py" +# Add the password to this user +chpasswd <<< "${app}:${password}" + #================================================= # GENERIC FINALIZATION #================================================= @@ -100,4 +103,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="$log_file" # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last \ No newline at end of file +ynh_script_progression --message="Installation of $app completed" --last