mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
19 lines
514 B
Bash
Executable file
19 lines
514 B
Bash
Executable file
#!/bin/bash
|
|
app=$1
|
|
new_users=$2
|
|
app_path=/var/www/$app
|
|
|
|
# Source app helpers
|
|
. /usr/share/yunohost/helpers
|
|
|
|
|
|
if [[ "APPNAMETOCHANGE" = "$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
|
|
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/
|
|
done
|
|
fi
|