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
0131634eb9
commit
4707e7d2db
2 changed files with 10 additions and 4 deletions
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue