2014-09-11 16:48:29 +02:00
|
|
|
#!/bin/bash
|
2019-01-04 17:50:59 +01:00
|
|
|
app=$1
|
2014-09-11 16:48:29 +02:00
|
|
|
new_users=$2
|
2017-03-06 13:47:59 +01:00
|
|
|
app_path=/var/www/$app
|
2014-09-11 16:48:29 +02:00
|
|
|
|
2017-02-13 23:06:33 +01:00
|
|
|
# Source app helpers
|
|
|
|
. /usr/share/yunohost/helpers
|
|
|
|
|
2014-09-11 16:48:29 +02:00
|
|
|
|
|
|
|
if [[ "freshrss" = "$app" ]];
|
|
|
|
then
|
2016-09-04 15:19:28 +02:00
|
|
|
for myuser in $(echo "$new_users" | sed "s/,/ /g")
|
|
|
|
do
|
2017-02-13 22:52:07 +01:00
|
|
|
user_token=$(ynh_string_random)
|
2019-03-31 19:01:27 +02:00
|
|
|
$app_path/cli/create-user.php --user $myuser --language en --token $user_token
|
2019-10-22 21:17:42 +02:00
|
|
|
sudo chown -R $app: $app_path/data/users/$myuser/
|
2016-09-04 15:19:28 +02:00
|
|
|
done
|
|
|
|
fi
|