mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
cleaning
This commit is contained in:
parent
b187c621b4
commit
176080a0d5
2 changed files with 6 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
app="__APP__"
|
app="__APP__"
|
||||||
user="__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
|
# Retrieve arguments
|
||||||
username=$1
|
username=$1
|
||||||
|
@ -14,6 +16,6 @@ source /usr/share/yunohost/helpers
|
||||||
user_pass=$(ynh_string_random)
|
user_pass=$(ynh_string_random)
|
||||||
|
|
||||||
# Create the new user in Wallabag
|
# Create the new user in Wallabag
|
||||||
(cd "/var/www/$app" && \
|
(cd "$install_dir" && \
|
||||||
sudo -u "$user" php${phpversion} "bin/console" --no-interaction --env=prod \
|
sudo -u "$user" php${phpversion} "bin/console" --no-interaction --env=prod \
|
||||||
fos:user:create "$username" "$user_email" "$user_pass")
|
fos:user:create "$username" "$user_email" "$user_pass")
|
||||||
|
|
|
@ -2,12 +2,14 @@
|
||||||
|
|
||||||
app="__APP__"
|
app="__APP__"
|
||||||
user="__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
|
# Retrieve arguments
|
||||||
username=$1
|
username=$1
|
||||||
purge=$2
|
purge=$2
|
||||||
|
|
||||||
# Deactivate the user from Wallabg
|
# Deactivate the user from Wallabg
|
||||||
(cd "/var/www/$app" && \
|
(cd "$install_dir" && \
|
||||||
sudo -u "$user" php${phpversion} "bin/console" --no-interaction --env=prod \
|
sudo -u "$user" php${phpversion} "bin/console" --no-interaction --env=prod \
|
||||||
fos:user:deactivate "$username")
|
fos:user:deactivate "$username")
|
||||||
|
|
Loading…
Add table
Reference in a new issue