Skip to content
This repository has been archived by the owner on Aug 25, 2019. It is now read-only.

Commit

Permalink
[fix] Properly check YunoHost users
Browse files Browse the repository at this point in the history
  • Loading branch information
Kloadut committed May 29, 2014
1 parent a293d36 commit 538aac0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ path=$2
user=$3

# Check user parameter
ls /home | grep $user
sudo yunohost user list --json | grep -q '"id": "$user"'
if [[ ! $? -eq 0 ]]; then
echo "Wrong user"
exit 1
Expand Down Expand Up @@ -61,7 +61,8 @@ sudo sed -i "s@NAMETOCHANGE@owncloud@g" /etc/php5/fpm/pool.d/owncloud.conf
# Set permissions to owncloud directories and /home directories + add Home external storage
for i in $(ls /home)
do
if [[ ! $i == yunohost.* ]];
sudo yunohost user list --json | grep -q '"id": "$i"'
if [[ $? -eq 0 ]];
then
sudo setfacl -m g:owncloud:rwx /home/$i
sudo mkdir $data_path/$i
Expand Down

0 comments on commit 538aac0

Please sign in to comment.