1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

[fix] Set system group in app hooks

This commit is contained in:
Jérôme Lebleu 2016-05-06 23:58:10 +02:00
parent e2e339fb32
commit b64d802e76
4 changed files with 9 additions and 3 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
APP=${!#}
user=$1 user=$1
sudo mkdir -p /home/$user sudo mkdir -p /home/$user
sudo setfacl -m g:$APP:rwx /home/$user sudo setfacl -m g:#GROUP#:rwx /home/$user

View file

@ -17,7 +17,7 @@
"mysql" "mysql"
], ],
"requirements": { "requirements": {
"yunohost": ">= 2.3.12" "yunohost": ">= 2.3.16"
}, },
"arguments": { "arguments": {
"install" : [ "install" : [

View file

@ -53,6 +53,9 @@ sudo useradd -c "$app system account" \
-d /var/lib/$app --system --user-group $app \ -d /var/lib/$app --system --user-group $app \
|| die "Unable to create $app system account" || die "Unable to create $app system account"
# Set system group in hooks
sed -i "s@#GROUP#@${app}@g" ../hooks/post_user_create
# Create app folders # Create app folders
sudo mkdir -p "$DESTDIR" "$DATADIR" sudo mkdir -p "$DESTDIR" "$DATADIR"

View file

@ -55,6 +55,9 @@ sudo cp ../conf/php-fpm.conf "$phpfpm_conf"
sudo chown root: $phpfpm_conf sudo chown root: $phpfpm_conf
sudo chmod 644 $phpfpm_conf sudo chmod 644 $phpfpm_conf
# Set system group in hooks
sed -i "s@#GROUP#@${app}@g" ../hooks/post_user_create
# occ helper for the current installation # occ helper for the current installation
_exec_occ() { _exec_occ() {
exec_occ "$DESTDIR" "$app" $@ exec_occ "$DESTDIR" "$app" $@