2
0
Fork 0

various changes

main
Ducky 2022-02-23 05:46:08 +00:00
parent 346818748c
commit 0b6fc9f2d6
1 changed files with 7 additions and 0 deletions

View File

@ -103,9 +103,16 @@ pre_script=""
post_script=""
services=()
if [[ $UID != 0 ]]; then
say_die "Unauthorized (are you root?)"
fi
if [[ ! -d $env_dir ]]; then
say_warn "Environment directory ($env_dir) not found."
else
chown root:root -R $env_dir
chmod 660 -R $env_dir
[[ -f "$env_dir/$host.pre" ]] && pre_script="$env_dir/$host.pre"
[[ -f "$env_dir/$host.post" ]] && post_script="$env_dir/$host.post"