From 2f1300f1bee019326ae8dc9dfeadb4ee1f8bad4d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 10 Apr 2020 02:30:40 +0200 Subject: [PATCH] Simplify install script, just use mkdir -p that will create what needs to be created, no need to check if it already exists --- scripts/install | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/scripts/install b/scripts/install index da1b344..d34416f 100755 --- a/scripts/install +++ b/scripts/install @@ -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