mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
17 lines
403 B
Bash
Executable file
17 lines
403 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -a
|
|
source /usr/share/yunohost/helpers
|
|
|
|
app=$1
|
|
new_users=$2
|
|
|
|
if [[ "${0//.\/50-}" = "$app" ]]; then
|
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|
|
|
for user in $(echo "$new_users" | sed "s/,/ /g")
|
|
do
|
|
user_token=$(ynh_string_random)
|
|
sudo -u $app $final_path/cli/create-user.php --user $user --language en --token $user_token
|
|
done
|
|
fi
|