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:
parent
e2e339fb32
commit
b64d802e76
4 changed files with 9 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 2.3.12"
|
"yunohost": ">= 2.3.16"
|
||||||
},
|
},
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install" : [
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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" $@
|
||||||
|
|
Loading…
Add table
Reference in a new issue