mirror of
https://github.com/myvesta/vesta
synced 2025-07-05 20:41:53 -07:00
Update main.sh
This commit is contained in:
parent
7f9105e8ea
commit
19ca71e8fb
1 changed files with 14 additions and 0 deletions
14
func/main.sh
14
func/main.sh
|
@ -299,6 +299,20 @@ is_dir_symlink() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Check if file exists
|
||||
if_file_exists() {
|
||||
if [[ -f "$1" ]]; then
|
||||
check_result $E_FORBIDEN "$1 file exists"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if directory exists
|
||||
if_dir_exists() {
|
||||
if [[ -d "$1" ]]; then
|
||||
check_result $E_FORBIDEN "$1 directory exists"
|
||||
fi
|
||||
}
|
||||
|
||||
# Get object value
|
||||
get_object_value() {
|
||||
object=$(grep "$2='$3'" $USER_DATA/$1.conf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue