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 16:06:44 +01:00
parent 0131634eb9
commit 4707e7d2db
2 changed files with 10 additions and 4 deletions

View file

@ -3,6 +3,9 @@
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
user_email=$2
@ -14,6 +17,6 @@ source /usr/share/yunohost/helpers
user_pass=$(ynh_string_random)
# Create the new user in Wallabag
(cd "/var/www/$app" && \
sudo -u "$user" php "bin/console" --no-interaction --env=prod \
(cd "$install_dir" && \
sudo -u "$user" php${phpversion} "bin/console" --no-interaction --env=prod \
fos:user:create "$username" "$user_email" "$user_pass")

View file

@ -3,11 +3,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" && \
sudo -u "$user" php "bin/console" --no-interaction --env=prod \
(cd "$install_dir" && \
sudo -u "$user" php${phpversion} "bin/console" --no-interaction --env=prod \
fos:user:deactivate "$username")