mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
Added validation if file exists
Added validation if file exists to not create, avoiding error when adding additional users with this command.
This commit is contained in:
parent
7b2b895d57
commit
0a51da2590
1 changed files with 5 additions and 1 deletions
|
@ -78,8 +78,12 @@ sed -i "/^$auth_user:/d" $htpasswd
|
|||
echo "$auth_user:$auth_hash" >> $htpasswd
|
||||
|
||||
# Symbolic link for secure web templates
|
||||
ln -s $htpasswd $shtpasswd
|
||||
if [ ! -L $shtpasswd ]; then
|
||||
ln -s $htpasswd $shtpasswd
|
||||
fi
|
||||
if [ ! -L $shtaccess ]; then
|
||||
ln -s $htaccess $shtaccess
|
||||
fi
|
||||
|
||||
# Restarting web server
|
||||
if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue