You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					47 lines
				
				1.4 KiB
			
		
		
			
		
	
	
					47 lines
				
				1.4 KiB
			| 
											2 years ago
										 | #!/bin/bash | ||
|  | # info: add cron reports | ||
|  | # options: NONE | ||
|  | # | ||
|  | # This function for enabling restart cron tasks | ||
|  | 
 | ||
|  | #----------------------------------------------------------# | ||
|  | #                Variables & Functions                     # | ||
|  | #----------------------------------------------------------# | ||
|  | 
 | ||
|  | # Includes | ||
|  | # shellcheck source=/etc/hestiacp/hestia.conf | ||
|  | source /etc/hestiacp/hestia.conf | ||
|  | # shellcheck source=/usr/local/hestia/func/main.sh | ||
|  | source $HESTIA/func/main.sh | ||
|  | # load config file | ||
|  | source_conf "$HESTIA/conf/hestia.conf" | ||
|  | 
 | ||
|  | #----------------------------------------------------------# | ||
|  | #                    Verifications                         # | ||
|  | #----------------------------------------------------------# | ||
|  | 
 | ||
|  | is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM' | ||
|  | 
 | ||
|  | # Perform verification if read-only mode is enabled | ||
|  | check_hestia_demo_mode | ||
|  | 
 | ||
|  | #----------------------------------------------------------# | ||
|  | #                       Action                             # | ||
|  | #----------------------------------------------------------# | ||
|  | 
 | ||
|  | # Add cron job | ||
|  | cmd="sudo $BIN/v-update-sys-queue restart" | ||
|  | check_cron=$(grep "$cmd" $HESTIA/data/users/admin/cron.conf 2> /dev/null) | ||
|  | if [ -z "$check_cron" ] && [ -n "$CRON_SYSTEM" ]; then | ||
|  | 	$BIN/v-add-cron-job admin '*' '*' '*' '*' '*' "$cmd" | ||
|  | fi | ||
|  | 
 | ||
|  | #----------------------------------------------------------# | ||
|  | #                       Hestia                             # | ||
|  | #----------------------------------------------------------# | ||
|  | 
 | ||
|  | # Logging | ||
|  | log_event "$OK" "$ARGUMENTS" | ||
|  | 
 | ||
|  | exit |