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_user_create
2021-03-23 00:34:33 -04:00

13 lines
381 B
Bash
Executable file

#!/bin/bash
app=APPNAMETOCHANGE
app_path=/var/www/$app
myuser=$1
# Source app helpers
. /usr/share/yunohost/helpers
user_token=$(ynh_string_random)
sudo $app_path/cli/create-user.php --user $myuser --language en --token $user_token
sudo chown -R $app:$app $app_path/data/users/$myuser/
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $app_path/data/users/$myuser/