mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
new hook post_user_delete
This commit is contained in:
parent
fe098e6e6b
commit
4481f3935b
1 changed files with 16 additions and 0 deletions
16
hooks/post_user_delete
Normal file
16
hooks/post_user_delete
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
user="$1"
|
||||
app="$(basename $0 | cut -d- -f 2-)" # Extract the app name from the script name, which is supposed to be something like "50-app_id"
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
# Define a function to execute commands with `occ`
|
||||
exec_occ() {
|
||||
(cd "$final_path" && ynh_exec_as "$app" \
|
||||
php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")
|
||||
}
|
||||
|
||||
exec_occ user:delete $user
|
Loading…
Add table
Reference in a new issue