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:
parent
60a326941c
commit
2f1300f1be
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user