Simplify install script, just use mkdir -p that will create what needs to be created, no need to check if it already exists

This commit is contained in:
Alexandre Aubin 2020-04-10 02:30:40 +02:00 committed by GitHub
parent 60a326941c
commit 2f1300f1be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,14 +128,7 @@ ynh_system_user_create --username=$app --home_dir=$home_path --use_shell
# COPY CONFIG FILE
#=================================================
if [ -e $home_path ]
then
echo "Nothing to do..."
else
mkdir -p $home_path/.minetest/
mkdir $home_path/.minetest/worlds/
fi
mkdir -p $home_path/.minetest/worlds/
cp -a ../conf/minetest.conf $home_path/.minetest/
#=================================================
@ -192,13 +185,7 @@ ynh_replace_string --match_string="__DAMAGE__" --replace_string="$damage" --targ
# CREATE WORLD
#=================================================
# Create logs dir
if [ -e /var/log/$app ]
then
echo "Nothing to do..."
else
mkdir /var/log/$app
fi
mkdir -p /var/log/$app
# Set permissions on logs
chown -R $app:$app /var/log/$app