File tree Expand file tree Collapse file tree 6 files changed +15
-10
lines changed
Expand file tree Collapse file tree 6 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ check_hestia_demo_mode
4343
4444# Updating notification
4545if [ " $id " = ' all' ]; then
46- for id in $( v-list-user-notifications admin plain | cut -f1) ; do
46+ for id in $( v-list-user-notifications " $user " plain | cut -f1) ; do
4747 update_object_value ' notifications' ' NID' " $id " ' $ACK' ' yes' 2> /dev/null
4848 done
4949else
Original file line number Diff line number Diff line change @@ -119,10 +119,15 @@ check_result $? "$HOST sync failed" "$E_CONNECT"
119119# ----------------------------------------------------------#
120120
121121# Adding local dns-cluster cron job
122- cmd=" sudo $BIN / v-update-sys-queue dns-cluster"
123- check_cron=$( grep " $cmd " $HESTIA /data/users/admin/ cron.conf 2> /dev/null)
122+ cmd=" v-update-sys-queue dns-cluster"
123+ check_cron=$( grep " $cmd " " /var/spool/ cron/crontabs/hestiaweb " 2> /dev/null)
124124if [ -z " $check_cron " ] && [ ! -z " $CRON_SYSTEM " ]; then
125- $BIN /v-add-cron-job admin ' */5' ' *' ' *' ' *' ' *' " $cmd "
125+ min=' */5'
126+ hour=' 0'
127+ day=' *'
128+ month=' *'
129+ wday=' *'
130+ echo " $min $hour * * * sudo /usr/local/hestia/bin/$cmd " > " /var/spool/cron/crontabs/hestiaweb"
126131fi
127132
128133# Logging
Original file line number Diff line number Diff line change 7070
7171#
7272chown ${user} : " ${AUTHKEY_FILE} "
73- chown admin : " ${PRVKEY_FILE} "
73+ chown ${ROOT_USER} : " ${PRVKEY_FILE} "
7474
7575# ----------------------------------------------------------#
7676# Hestia #
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ source_conf "$HESTIA/conf/hestia.conf"
3636check_args ' 1' " $# " ' USER [RESTART]'
3737is_format_valid ' user'
3838is_object_valid ' user' ' USER' " $user "
39- if [ " $user " = ' admin ' ]; then
39+ if [ " $user " = " $ROOT_USER " ]; then
4040 exit
4141fi
4242
@@ -110,8 +110,8 @@ rm -f /var/spool/cron/crontabs/$user
110110rm -rf $USER_DATA
111111
112112# Updating admin counter
113- if [ " $user " != ' admin ' ]; then
114- decrease_user_value ' admin ' ' $U_USERS'
113+ if [ " $user " != " $ROOT_USER " ]; then
114+ decrease_user_value " $ROOT_USER " ' $U_USERS'
115115fi
116116
117117# ----------------------------------------------------------#
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ source_conf "$HESTIA/conf/hestia.conf"
3030check_args ' 1' " $# " ' USER'
3131is_format_valid ' user'
3232is_object_valid ' user' ' USER' " $user "
33- if [ " $user " = ' admin ' ]; then
33+ if [ " $user " = " $ROOT_USER " ]; then
3434 exit
3535fi
3636
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ check_args '0' "$#" '[FORMAT]'
127127$BIN /v-update-user-stats
128128
129129# Defining config
130- conf=" $HESTIA /data/users/admin /overall_stats.log"
130+ conf=" $HESTIA /data/users/$ROOT_USER /overall_stats.log"
131131if [ ! -e " $conf " ]; then
132132 touch $conf
133133fi
You can’t perform that action at this time.
0 commit comments