1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wallabag2_ynh.git synced 2024-10-01 13:35:06 +02:00
This commit is contained in:
Éric Gaspar 2023-11-16 13:23:05 +01:00
parent b187c621b4
commit 176080a0d5
2 changed files with 6 additions and 2 deletions

View file

@ -2,6 +2,8 @@
app="__APP__"
user="__APP__"
install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
# Retrieve arguments
username=$1
@ -14,6 +16,6 @@ source /usr/share/yunohost/helpers
user_pass=$(ynh_string_random)
# Create the new user in Wallabag
(cd "/var/www/$app" && \
(cd "$install_dir" && \
sudo -u "$user" php${phpversion} "bin/console" --no-interaction --env=prod \
fos:user:create "$username" "$user_email" "$user_pass")

View file

@ -2,12 +2,14 @@
app="__APP__"
user="__APP__"
install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
# Retrieve arguments
username=$1
purge=$2
# Deactivate the user from Wallabg
(cd "/var/www/$app" && \
(cd "$install_dir" && \
sudo -u "$user" php${phpversion} "bin/console" --no-interaction --env=prod \
fos:user:deactivate "$username")