mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 13:54:26 -07:00
Update main.sh
This commit is contained in:
parent
8a60b257a2
commit
f41ad21e1e
1 changed files with 14 additions and 0 deletions
14
func/main.sh
14
func/main.sh
|
@ -296,6 +296,20 @@ is_dir_symlink() {
|
||||||
fi
|
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
|
||||||
get_object_value() {
|
get_object_value() {
|
||||||
object=$(grep "$2='$3'" $USER_DATA/$1.conf)
|
object=$(grep "$2='$3'" $USER_DATA/$1.conf)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue