Browse Source

[fix] Set system group in app hooks

pull/4/head
Jérôme Lebleu 10 years ago
parent
commit
b64d802e76
  1. 4
      hooks/post_user_create
  2. 2
      manifest.json
  3. 3
      scripts/install
  4. 3
      scripts/upgrade

4
hooks/post_user_create

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

2
manifest.json

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

3
scripts/install

@ -53,6 +53,9 @@ sudo useradd -c "$app system account" \
-d /var/lib/$app --system --user-group $app \
|| 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
sudo mkdir -p "$DESTDIR" "$DATADIR"

3
scripts/upgrade

@ -55,6 +55,9 @@ sudo cp ../conf/php-fpm.conf "$phpfpm_conf"
sudo chown root: $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
_exec_occ() {
exec_occ "$DESTDIR" "$app" $@

Loading…
Cancel
Save