mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 13:01:51 -07:00
autoupdates + fqdn workaround
This commit is contained in:
parent
29fc164954
commit
17c20881e1
3 changed files with 30 additions and 0 deletions
|
@ -380,6 +380,13 @@ if [ -z "$servername" ]; then
|
||||||
servername=$(hostname -f)
|
servername=$(hostname -f)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set FQND if it wasn't set
|
||||||
|
mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)'
|
||||||
|
mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}'
|
||||||
|
if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then
|
||||||
|
servername="$servername.example.com"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set email if it wasn't set
|
# Set email if it wasn't set
|
||||||
if [ -z "$email" ]; then
|
if [ -z "$email" ]; then
|
||||||
email="admin@$servername"
|
email="admin@$servername"
|
||||||
|
@ -1182,6 +1189,9 @@ check_result $? "vesta start failed"
|
||||||
# Adding notifications
|
# Adding notifications
|
||||||
$VESTA/upd/add_notifications.sh
|
$VESTA/upd/add_notifications.sh
|
||||||
|
|
||||||
|
# Adding cronjob for autoupdates
|
||||||
|
$VESTA/bin/v-add-cron-vesta-autoupdate
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta Access Info #
|
# Vesta Access Info #
|
||||||
|
|
|
@ -380,6 +380,13 @@ if [ -z "$servername" ]; then
|
||||||
servername=$(hostname -f)
|
servername=$(hostname -f)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set FQND if it wasn't set
|
||||||
|
mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)'
|
||||||
|
mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}'
|
||||||
|
if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then
|
||||||
|
servername="$servername.example.com"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set email if it wasn't set
|
# Set email if it wasn't set
|
||||||
if [ -z "$email" ]; then
|
if [ -z "$email" ]; then
|
||||||
email="admin@$servername"
|
email="admin@$servername"
|
||||||
|
@ -1252,6 +1259,9 @@ check_result $? "vesta start failed"
|
||||||
# Adding notifications
|
# Adding notifications
|
||||||
$VESTA/upd/add_notifications.sh
|
$VESTA/upd/add_notifications.sh
|
||||||
|
|
||||||
|
# Adding cronjob for autoupdates
|
||||||
|
$VESTA/bin/v-add-cron-vesta-autoupdate
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta Access Info #
|
# Vesta Access Info #
|
||||||
|
|
|
@ -365,6 +365,13 @@ if [ -z "$servername" ]; then
|
||||||
servername=$(hostname -f)
|
servername=$(hostname -f)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set FQND if it wasn't set
|
||||||
|
mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)'
|
||||||
|
mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}'
|
||||||
|
if ! [[ "$servername" =~ ^${mask1}${mask2}$ ]]; then
|
||||||
|
servername="$servername.example.com"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set email if it wasn't set
|
# Set email if it wasn't set
|
||||||
if [ -z "$email" ]; then
|
if [ -z "$email" ]; then
|
||||||
email="admin@$servername"
|
email="admin@$servername"
|
||||||
|
@ -1171,6 +1178,9 @@ check_result $? "vesta start failed"
|
||||||
# Adding notifications
|
# Adding notifications
|
||||||
$VESTA/upd/add_notifications.sh
|
$VESTA/upd/add_notifications.sh
|
||||||
|
|
||||||
|
# Adding cronjob for autoupdates
|
||||||
|
$VESTA/bin/v-add-cron-vesta-autoupdate
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta Access Info #
|
# Vesta Access Info #
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue