1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
freshrss_ynh/hooks/post_app_addaccess

20 lines
431 B
Text
Raw Normal View History

#!/bin/bash
app=$1
new_users=$2
2014-09-20 10:56:59 +02:00
app_path=/var/www/freshrss
2017-02-13 23:06:33 +01:00
# Source app helpers
. /usr/share/yunohost/helpers
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)
$app_path/cli/create-user.php --user $myuser --language en --token $user_token --no-default-feeds
2016-09-04 15:19:28 +02:00
sudo chown -R www-data: $app_path/data/users/$myuser/
done
fi