mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
improoved suspend function
This commit is contained in:
parent
3d44d6dc23
commit
e177cefef9
34 changed files with 75 additions and 172 deletions
12
func/main.sh
12
func/main.sh
|
@ -457,17 +457,6 @@ sync_cron_jobs() {
|
|||
|
||||
|
||||
### Format Validators ###
|
||||
# URL
|
||||
validate_format_url() {
|
||||
check_http=$(echo "$1" | grep "^http://" )
|
||||
needed_chars=$(echo "$1" | cut -f 2 -d \.)
|
||||
if [ -z "$check_http" ] || [ -z "$needed_chars" ]; then
|
||||
echo "Error: url $1 is not valid"
|
||||
log_event "$E_INVALID" "$EVENT"
|
||||
exit $E_INVALID
|
||||
fi
|
||||
}
|
||||
|
||||
# Shell
|
||||
validate_format_shell() {
|
||||
if [ -z "$(grep -w $1 /etc/shells)" ]; then
|
||||
|
@ -753,7 +742,6 @@ validate_format(){
|
|||
stats_user) validate_format_username "$arg" "$arg_name" ;;
|
||||
template) validate_format_username "$arg" "$arg_name" ;;
|
||||
ttl) validate_format_int "$arg" ;;
|
||||
url) validate_format_url "$arg" ;;
|
||||
user) validate_format_username "$arg" ;;
|
||||
wday) validate_format_mhdmw "$arg" $arg_name ;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue