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
Clément d2730ede88
Fix/user add (#43)
* remplace app instance name into hooks
* update forgotten version number
2018-03-18 17:21:29 +01:00

18 lines
439 B
Bash
Executable file

#!/bin/bash
app=APPNAMETOCHANGE
new_users=$2
app_path=/var/www/$app
# Source app helpers
. /usr/share/yunohost/helpers
if [[ "freshrss" = "$app" ]];
then
for myuser in $(echo "$new_users" | sed "s/,/ /g")
do
user_token=$(ynh_string_random)
$app_path/cli/create-user.php --user $myuser --language en --token $user_token --no-default-feeds
sudo chown -R www-data: $app_path/data/users/$myuser/
done
fi