mirror of
				https://github.com/whyour/qinglong.git
				synced 2025-11-04 02:56:07 +08:00 
			
		
		
		
	增加示例脚本
This commit is contained in:
		
							parent
							
								
									445dee00f7
								
							
						
					
					
						commit
						0593dae41d
					
				
							
								
								
									
										8
									
								
								sample/test.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								sample/test.js
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * 任务名称
 | 
				
			||||||
 | 
					 * name: script name
 | 
				
			||||||
 | 
					 * 定时规则
 | 
				
			||||||
 | 
					 * cron: 1 9 * * *
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					console.log('test scripts');
 | 
				
			||||||
							
								
								
									
										8
									
								
								sample/test.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								sample/test.py
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					任务名称
 | 
				
			||||||
 | 
					name: script name
 | 
				
			||||||
 | 
					定时规则
 | 
				
			||||||
 | 
					cron: 1 9 * * *
 | 
				
			||||||
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					print("test script")
 | 
				
			||||||
| 
						 | 
					@ -33,8 +33,12 @@ file_task_sample=$dir_sample/task.sample.sh
 | 
				
			||||||
file_extra_sample=$dir_sample/extra.sample.sh
 | 
					file_extra_sample=$dir_sample/extra.sample.sh
 | 
				
			||||||
file_notify_js_sample=$dir_sample/notify.js
 | 
					file_notify_js_sample=$dir_sample/notify.js
 | 
				
			||||||
file_notify_py_sample=$dir_sample/notify.py
 | 
					file_notify_py_sample=$dir_sample/notify.py
 | 
				
			||||||
 | 
					file_test_js_sample=$dir_sample/test.js
 | 
				
			||||||
 | 
					file_test_py_sample=$dir_sample/test.py
 | 
				
			||||||
file_notify_py=$dir_scripts/notify.py
 | 
					file_notify_py=$dir_scripts/notify.py
 | 
				
			||||||
file_notify_js=$dir_scripts/sendNotify.js
 | 
					file_notify_js=$dir_scripts/sendNotify.js
 | 
				
			||||||
 | 
					file_test_js=$dir_scripts/test.js
 | 
				
			||||||
 | 
					file_test_py=$dir_scripts/test.py
 | 
				
			||||||
nginx_app_conf=$dir_root/docker/front.conf
 | 
					nginx_app_conf=$dir_root/docker/front.conf
 | 
				
			||||||
nginx_conf=$dir_root/docker/nginx.conf
 | 
					nginx_conf=$dir_root/docker/nginx.conf
 | 
				
			||||||
dep_notify_py=$dir_dep/notify.py
 | 
					dep_notify_py=$dir_dep/notify.py
 | 
				
			||||||
| 
						 | 
					@ -234,6 +238,16 @@ fix_config() {
 | 
				
			||||||
    echo
 | 
					    echo
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if [[ ! -s $file_test_js ]]; then
 | 
				
			||||||
 | 
					    cp -fv $file_test_js_sample $file_test_js
 | 
				
			||||||
 | 
					    echo
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if [[ ! -s $file_test_py ]]; then
 | 
				
			||||||
 | 
					    cp -fv $file_test_py_sample $file_test_py
 | 
				
			||||||
 | 
					    echo
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if [[ -s /etc/nginx/conf.d/default.conf ]]; then
 | 
					  if [[ -s /etc/nginx/conf.d/default.conf ]]; then
 | 
				
			||||||
    echo -e "检测到默认nginx配置文件,清空...\n"
 | 
					    echo -e "检测到默认nginx配置文件,清空...\n"
 | 
				
			||||||
    cat /dev/null >/etc/nginx/conf.d/default.conf
 | 
					    cat /dev/null >/etc/nginx/conf.d/default.conf
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user