Only try to create user if not present.

This commit is contained in:
opi 2016-04-24 19:46:20 +02:00
parent 7f54d2971f
commit eaa62ad5a1
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,9 @@ else
fi
# Set permissions to searx directory
sudo useradd searx -d $final_path
if ! id -u searx > /dev/null 2>&1; then
sudo useradd searx -d $final_path
fi
sudo chown searx:searx -R $final_path
# Copy uwsgi config