ソースを参照

Update logging in v-scripts

Kristan Kenney 5 年 前
コミット
2d14afd378

+ 1 - 1
bin/v-add-database-host

@@ -130,7 +130,7 @@ else
 fi
 fi
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "Databases" "Added external $type database server ($host) to the system."
+$BIN/v-log-action "system" "Info" "Database" "Added external $type database server ($host) to the system."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 2 - 1
bin/v-add-user

@@ -257,7 +257,8 @@ fi
 $BIN/v-add-user-sftp-jail $user
 $BIN/v-add-user-sftp-jail $user
 
 
 # Logging
 # Logging
-$BIN/v-log-action "$user" "Info" "Users" "Added user $user to the system."
+$BIN/v-log-action "system" "Info" "Users" "User account added (Name: $user)."
+$BIN/v-log-action "$user" "Info" "System" "User account added."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-add-user-package

@@ -99,7 +99,7 @@ chmod 644 $HESTIA/data/packages/$package.pkg
 if [ "$rewrite" != 'yes' ]; then
 if [ "$rewrite" != 'yes' ]; then
     $BIN/v-log-action "system" "Info" "Packages" "Added new package (Name: $package)."
     $BIN/v-log-action "system" "Info" "Packages" "Added new package (Name: $package)."
 else
 else
-    $BIN/v-log-action "system" "Info" "Mail" "Updated a package (Name: $package)."
+    $BIN/v-log-action "system" "Info" "Packages" "Updated package (Name: $package)."
 fi
 fi
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 

+ 1 - 1
bin/v-add-web-domain-backend

@@ -90,7 +90,7 @@ $BIN/v-restart-web-backend $restart
 check_result $? "Web backend restart failed" >/dev/null
 check_result $? "Web backend restart failed" >/dev/null
 
 
 # Logging
 # Logging
-$BIN/v-log-action "$user" "Info" "Web" "Added $WEB_BACKEND backend configuration (Domain: $domain)."
+$BIN/v-log-action "system" "Info" "Web" "Added $WEB_BACKEND backend configuration (Domain: $domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 2
bin/v-add-web-domain-ssl

@@ -146,8 +146,7 @@ if [ ! -z "$UPDATE_SSL_SCRIPT" ]; then
 fi
 fi
 
 
 # Logging
 # Logging
-$BIN/v-log-action "$user" "Info" "Web" "Enabled SSL (Domain: $domain)."
-log_history "enabled ssl support for $domain"
+$BIN/v-log-action "$user" "Info" "Web" "Added certificate and enabled SSL (Domain: $domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 2 - 2
bin/v-change-sys-demo-mode

@@ -52,9 +52,9 @@ check_result $? "restart" >/dev/null 2>&1
 
 
 # Logging
 # Logging
 if [ "$active" = "yes" ]; then
 if [ "$active" = "yes" ]; then
-    $BIN/v-log-action "system" "Warn" "System" "Demonstration mode (restricted access) enabled."
+    $BIN/v-log-action "system" "Warning" "System" "Demonstration mode (restricted access) enabled."
 else
 else
-    $BIN/v-log-action "system" "Warn" "Info" "Demonstration mode (restricted access) disabled."
+    $BIN/v-log-action "system" "Warning" "Info" "Demonstration mode (restricted access) disabled."
 fi
 fi
 
 
 
 

+ 1 - 1
bin/v-change-sys-hostname

@@ -62,7 +62,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Warn" "System" "Changed system hostname (Host: $domain)."
+$BIN/v-log-action "system" "Warning" "System" "Changed system hostname (Host: $domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-change-sys-port

@@ -93,7 +93,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Warn" "System" "Hestia Control Panel backend port changed (New Value: $PORT, Old Value: $ORIGINAL_PORT)."
+$BIN/v-log-action "system" "Warning" "System" "Hestia Control Panel backend port changed (New Value: $PORT, Old Value: $ORIGINAL_PORT)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 2 - 2
bin/v-change-user-password

@@ -72,8 +72,8 @@ update_user_value "$user" '$RKEY' "$(generate_password)"
 update_user_value "$user" '$MD5' "$md5"
 update_user_value "$user" '$MD5' "$md5"
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Warn" "System" "Password changed (User: $user)."
-$BIN/v-log-action "$user" "Warn" "System" "Password changed."
+$BIN/v-log-action "system" "Warning" "Security" "Password changed (User: $user)."
+$BIN/v-log-action "$user" "Warning" "Security" "Password changed."
 
 
 log_history "changed password"
 log_history "changed password"
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"

+ 1 - 1
bin/v-change-user-rkey

@@ -63,7 +63,7 @@ else
 fi
 fi
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Warn" "Users" "Password reset requested (User: $user)."
+$BIN/v-log-action "system" "Warning" "Users" "Password reset requested (User: $user)."
 $BIN/v-log-action "$user" "Warn" "System" "Password reset requested."
 $BIN/v-log-action "$user" "Warn" "System" "Password reset requested."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 

+ 1 - 1
bin/v-delete-cron-hestia-autoupdate

@@ -64,7 +64,7 @@ $BIN/v-restart-cron
 check_result $? "Cron restart failed" >/dev/null
 check_result $? "Cron restart failed" >/dev/null
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Warn" "System" "Automatic updates disabled."
+$BIN/v-log-action "system" "Warning" "System" "Automatic updates disabled."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-delete-sys-sftp-jail

@@ -84,7 +84,7 @@ service ssh restart > /dev/null 2>&1
 service sshd restart > /dev/null 2>&1
 service sshd restart > /dev/null 2>&1
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Warn" "Plugins" "SFTP Chroot Jail disabled."
+$BIN/v-log-action "system" "Warning" "Plugins" "SFTP Chroot Jail disabled."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-delete-user-2fa

@@ -53,7 +53,7 @@ update_user_value "$user" '$QRCODE' ""
 #                       Hestia                             #
 #                       Hestia                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-$BIN/v-log-action "system" "Warn" "System" "Two-factor authentication disabled (User: $user)."
+$BIN/v-log-action "system" "Warning" "System" "Two-factor authentication disabled (User: $user)."
 $BIN/v-log-action "$user" "Warn" "System" "Two-factor authentication disabled."
 $BIN/v-log-action "$user" "Warn" "System" "Two-factor authentication disabled."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 

+ 2 - 2
bin/v-delete-user-auth-log

@@ -32,8 +32,8 @@ is_object_valid 'user' 'USER' "$user"
 # Remove log file and log event
 # Remove log file and log event
 if [ -f $USER_DATA/auth.log ]; then
 if [ -f $USER_DATA/auth.log ]; then
     rm -f $USER_DATA/auth.log
     rm -f $USER_DATA/auth.log
-    $BIN/v-log-action "system" "Warn" "System" "User authentication log deleted (User: $user)."
-    $BIN/v-log-action "$user" "Warn" "System" "Login history cleared."
+    $BIN/v-log-action "system" "Warning" "Security" "User authentication log deleted (User: $user)."
+    $BIN/v-log-action "$user" "Warning" "Security" "Login history cleared."
     log_event "$OK" "$ARGUMENTS"
     log_event "$OK" "$ARGUMENTS"
 fi
 fi
 
 

+ 2 - 2
bin/v-delete-user-log

@@ -36,8 +36,8 @@ is_object_valid 'user' 'USER' "$user"
 # Remove log file and log event
 # Remove log file and log event
 if [ -f "$HESTIA/data/users/$user/history.log" ]; then
 if [ -f "$HESTIA/data/users/$user/history.log" ]; then
     rm -f $HESTIA/data/users/$user/history.log
     rm -f $HESTIA/data/users/$user/history.log
-    $BIN/v-log-action "system" "Info" "System" "User history log deleted (User: $user)."
-    $BIN/v-log-action "$user" "Info" "System" "User history log deleted."
+    $BIN/v-log-action "system" "Warning" "Security" "User history log deleted (User: $user)."
+    $BIN/v-log-action "$user" "Info" "Security" "User history log deleted."
     log_event "$OK" "$ARGUMENTS"
     log_event "$OK" "$ARGUMENTS"
 fi
 fi
 
 

+ 1 - 1
bin/v-generate-api-key

@@ -44,6 +44,6 @@ echo ${HASH}
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
-$BIN/v-log-action "system" "Warn" "System" "New system API key generated (Key: ${HASH})."
+$BIN/v-log-action "system" "Warning" "System" "New system API key generated (Key: ${HASH})."
 
 
 exit
 exit

+ 3 - 2
bin/v-restart-service

@@ -72,7 +72,9 @@ for service in $service_list; do
     # Check the result of the service restart and report whether it failed.
     # Check the result of the service restart and report whether it failed.
     if [ $? -ne 0 ]; then
     if [ $? -ne 0 ]; then
         check_result $E_RESTART "ERROR: Restart of $service failed."
         check_result $E_RESTART "ERROR: Restart of $service failed."
-        $BIN/v-log-action "system" "Error" "System" "Service failed to start (Name: $MAIL_SYSTEM)."
+        $BIN/v-log-action "system" "Error" "System" "Service failed to restart (Name: $service)."
+    else
+        $BIN/v-log-action "system" "Info" "System" "Service restarted (Name: $service)."
     fi
     fi
 done
 done
 
 
@@ -82,7 +84,6 @@ done
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Warning" "System" "Service restarted (Name: $service)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 7 - 3
bin/v-start-service

@@ -43,11 +43,15 @@ for service in $service_list; do
     if [ "$service" = "iptables" ]; then
     if [ "$service" = "iptables" ]; then
         $BIN/v-update-firewall
         $BIN/v-update-firewall
     else
     else
-        systemctl start $service > /dev/null 2>&1
-        $BIN/v-log-action "system" "Error" "System" "Service started (Name: $service)."
+        systemctl start $service
+        result=$?
+        if [ "$result" -ne 0 ]; then
+            $BIN/v-log-action "system" "Error" "System" "Service failed to start (Name: $service)."
+        else
+            $BIN/v-log-action "system" "Info" "System" "Service started (Name: $service)."
+        fi
     fi
     fi
     check_result $? "ERROR: $service start failed" $E_RESTART
     check_result $? "ERROR: $service start failed" $E_RESTART
-    check_result $? $BIN/v-log-action "system" "Error" "System" "Service failed to start (Name: $service)."
 done
 done
 
 
 
 

+ 8 - 3
bin/v-stop-service

@@ -46,11 +46,16 @@ for service in $service_list; do
     if [ "$service" = "iptables" ]; then
     if [ "$service" = "iptables" ]; then
         $BIN/v-stop-firewall
         $BIN/v-stop-firewall
     else
     else
-        systemctl stop $service >/dev/null 2>&1
-        $BIN/v-log-action "system" "Info" "System" "Service stopped (Name: $service)."
+        systemctl stop $service
+        result=$?
+        if [ "$result" -ne 0 ]; then
+            $BIN/v-log-action "system" "Error" "System" "Service failed to stop (Name: $service)."
+        else
+            $BIN/v-log-action "system" "Info" "System" "Service stopped (Name: $service)."
+        fi
     fi
     fi
     check_result $? "ERROR: $service stop failed" $E_RESTART
     check_result $? "ERROR: $service stop failed" $E_RESTART
-    $BIN/v-log-action "system" "Error" "System" "Service failed to stop (Name: $service)."
+
 done
 done
 
 
 
 

+ 1 - 1
bin/v-suspend-cron-job

@@ -57,7 +57,7 @@ $BIN/v-restart-cron $restart
 check_result $? "Cron restart failed" >/dev/null
 check_result $? "Cron restart failed" >/dev/null
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Cron job suspended (Job: $job)."
+$BIN/v-log-action "system" "Info" "Cron Jobs" "Cron job suspended (Job: $job)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-suspend-database

@@ -61,7 +61,7 @@ update_object_value 'db' 'DB' "$database" '$SUSPENDED' 'yes'
 increase_user_value "$user" '$SUSPENDED_DB'
 increase_user_value "$user" '$SUSPENDED_DB'
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Suspended database (User: $user, Database: $database)."
+$BIN/v-log-action "system" "Info" "Database" "Suspended database (User: $user, Database: $database)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-suspend-dns-domain

@@ -65,7 +65,7 @@ sed -i "s/SUSPENDED='no'/SUSPENDED='yes'/g" $USER_DATA/dns/$domain.conf
 increase_user_value "$user" '$SUSPENDED_DNS'
 increase_user_value "$user" '$SUSPENDED_DNS'
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Suspended DNS domain (User: $user, Domain: $domain)"
+$BIN/v-log-action "system" "Info" "DNS" "Suspended DNS zone (User: $user, Domain: $domain)"
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-suspend-dns-record

@@ -62,7 +62,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Error" "System" "Suspended DNS record (User: $user, Domain: $domain, Record: $id)."
+$BIN/v-log-action "system" "Info" "DNS" "Suspended DNS record (User: $user, Domain: $domain, Record: $id)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-suspend-mail-account

@@ -67,7 +67,7 @@ fi
 update_object_value "mail/$domain" 'ACCOUNT' "$account" '$SUSPENDED' 'yes'
 update_object_value "mail/$domain" 'ACCOUNT' "$account" '$SUSPENDED' 'yes'
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Suspended mail account (User: $user, Account: $account@$domain)."
+$BIN/v-log-action "system" "Info" "Mail" "Suspended mail account (User: $user, Account: $account@$domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-suspend-mail-domain

@@ -63,7 +63,7 @@ sed -i "s/SUSPENDED='no'/SUSPENDED='yes'/g" $USER_DATA/mail/$domain.conf
 increase_user_value "$user" '$SUSPENDED_MAIL'
 increase_user_value "$user" '$SUSPENDED_MAIL'
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Suspended mail domain (User: $user, Domain: $domain)."
+$BIN/v-log-action "system" "Info" "Mail" "Suspended mail domain (User: $user, Domain: $domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-suspend-user

@@ -97,7 +97,7 @@ update_user_value "$user" '$SUSPENDED' 'yes'
 increase_user_value 'admin' '$SUSPENDED_USERS'
 increase_user_value 'admin' '$SUSPENDED_USERS'
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Suspended user account (Name: $user)."
+$BIN/v-log-action "system" "Info" "Users" "Suspended user account (Name: $user)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-suspend-web-domain

@@ -93,7 +93,7 @@ $BIN/v-restart-proxy $restart
 check_result $? "Proxy restart failed" >/dev/null
 check_result $? "Proxy restart failed" >/dev/null
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Suspended web domain (User: $user, Domain: $domain)."
+$BIN/v-log-action "system" "Info" "Web" "Suspended web domain (User: $user, Domain: $domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-unsuspend-cron-job

@@ -57,7 +57,7 @@ $BIN/v-restart-cron $restart
 check_result $? "Cron restart failed" >/dev/null
 check_result $? "Cron restart failed" >/dev/null
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Unsuspended cron job (User: $user, Job: $job)."
+$BIN/v-log-action "system" "Info" "Cron Jobs" "Unsuspended cron job (User: $user, Job: $job)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-unsuspend-database

@@ -59,7 +59,7 @@ update_object_value 'db' 'DB' "$database" '$SUSPENDED' 'no'
 decrease_user_value "$user" '$SUSPENDED_DB'
 decrease_user_value "$user" '$SUSPENDED_DB'
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Unsuspended database (User: $user, Database: $database)."
+$BIN/v-log-action "system" "Info" "Database" "Unsuspended database (User: $user, Database: $database)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-unsuspend-dns-domain

@@ -70,7 +70,7 @@ decrease_user_value "$user" '$SUSPENDED_DNS'
 sed -i "s/SUSPENDED='yes'/SUSPENDED='no'/g" $USER_DATA/dns/$domain.conf
 sed -i "s/SUSPENDED='yes'/SUSPENDED='no'/g" $USER_DATA/dns/$domain.conf
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Unsuspended DNS domain (User: $user, Domain: $domain)."
+$BIN/v-log-action "system" "Info" "DNS" "Unsuspended DNS zone (User: $user, Domain: $domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-unsuspend-dns-record

@@ -61,7 +61,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Unsuspended DNS record (User: $user, Domain: $domain, Record: $id)."
+$BIN/v-log-action "system" "Info" "DNS" "Unsuspended DNS record (User: $user, Domain: $domain, Record: $id)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-unsuspend-mail-account

@@ -67,7 +67,7 @@ fi
 update_object_value "mail/$domain" 'ACCOUNT' "$account" '$SUSPENDED' 'no'
 update_object_value "mail/$domain" 'ACCOUNT' "$account" '$SUSPENDED' 'no'
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Unsuspended mail account (User: $user, Account: $account@$domain)."
+$BIN/v-log-action "system" "Info" "Mail" "Unsuspended mail account (User: $user, Account: $account@$domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-unsuspend-mail-domain

@@ -63,7 +63,7 @@ if [ ! -z "$IMAP_SYSTEM" ]; then
     $BIN/v-add-sys-webmail $user $domain 'yes'
     $BIN/v-add-sys-webmail $user $domain 'yes'
 fi
 fi
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Unsuspended mail domain (User: $user, Domain: $domain)."
+$BIN/v-log-action "system" "Info" "Mail" "Unsuspended mail domain (User: $user, Domain: $domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-unsuspend-user

@@ -97,7 +97,7 @@ $BIN/v-restart-cron $restart
 check_result $? "Cron restart failed" >/dev/null
 check_result $? "Cron restart failed" >/dev/null
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Unsuspended user account (User: $user)."
+$BIN/v-log-action "system" "Info" "Users" "Unsuspended user account (User: $user)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 1 - 1
bin/v-unsuspend-web-domain

@@ -100,7 +100,7 @@ $BIN/v-restart-proxy $restart
 check_result $? "Proxy restart failed" >/dev/null
 check_result $? "Proxy restart failed" >/dev/null
 
 
 # Logging
 # Logging
-$BIN/v-log-action "system" "Info" "System" "Unsuspended web domain (User: $user, Domain: $domain)."
+$BIN/v-log-action "system" "Info" "Web" "Unsuspended web domain (User: $user, Domain: $domain)."
 log_event "$OK" "$ARGUMENTS"
 log_event "$OK" "$ARGUMENTS"
 
 
 exit
 exit

+ 0 - 1
bin/v-update-sys-hestia-git

@@ -422,7 +422,6 @@ install_build() {
     for i in $DEB_DIR/*.deb; do
     for i in $DEB_DIR/*.deb; do
         # Install all available packages
         # Install all available packages
         dpkg -i $i
         dpkg -i $i
-        $BIN/v-log-action "system" "Warning" "System" "Development package installed."
     done
     done
     # Remove temporary files
     # Remove temporary files
     rm -rf $BUILD_DIR
     rm -rf $BUILD_DIR

+ 9 - 0
func/upgrade.sh

@@ -414,7 +414,16 @@ upgrade_init_logging() {
     # Create log file
     # Create log file
     touch $LOG
     touch $LOG
 
 
+    # Add message to system log
     $BIN/v-log-action "system" "Info" "Updates" "Started update installation (Latest: $new_version, Previous: $VERSION)."
     $BIN/v-log-action "system" "Info" "Updates" "Started update installation (Latest: $new_version, Previous: $VERSION)."
+
+    # Add warnings for pre-release builds
+    if [[ "$new_version" =~ "alpha" ]]; then
+        $BIN/v-log-action "system" "Warning" "Updates" "Development build for testing purposes only. Report bugs at https://github.com/hestiacp/hestiacp/issues/."
+    fi
+    if [[ "$new_version" =~ "beta" ]]; then
+        $BIN/v-log-action "system" "Warning" "Updates" "Beta release. Please report bugs at https://github.com/hestiacp/hestiacp/issues/."
+    fi
 }
 }
 
 
 upgrade_start_backup() {
 upgrade_start_backup() {