Skip to content

Commit

Permalink
Adding 'pasta_srv.sh'
Browse files Browse the repository at this point in the history
  • Loading branch information
bptfreitas committed Aug 30, 2024
1 parent 282e5ab commit 1233cef
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .tests/pasta_srv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

if [[ ! -d /srv ]]; then

echo "Pasta /srv nao existe!"
exit 1

fi

owner=`ls -l / | grep srv | awk '{ print $3 }'`

group=`ls -l / | grep srv | awk '{ print $4 }'`

if [[ "$owner" != "root" ]]; then
echo "Dono eh '$owner', deve ser 'root'!"
exit 1
fi

if [[ "$group" != "gerente" ]]; then
echo "Grupo eh '$group', deve ser 'root'!"
exit 1
fi

exit 0
3 changes: 3 additions & 0 deletions trabalho.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash


0 comments on commit 1233cef

Please sign in to comment.