u
This commit is contained in:
@@ -69,9 +69,16 @@ create_dir() {
|
||||
echo "error: unable to create the directory '${_directory}'"
|
||||
echo " command:"
|
||||
echo " runuser -l ${system_user} -c '${mkdir_command}'"
|
||||
|
||||
echo "will try creating the directory as root, and changing owner"
|
||||
mkdir -p "${_directory}"
|
||||
sudo chown -R ${system_user}:${system_user} "${_directory}"
|
||||
|
||||
if [ -d "$_directory" ]
|
||||
then
|
||||
echo "success!"
|
||||
else
|
||||
echo "failure! directory could not be created."
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user