Shell脚本实现#!/bin/bash echo "开始发布" cd /run-path echo "同步代码" git pull echo "编译项目" go build -o /build-file-path -ldflags "-w -s" ./ echo "停止当前服务" pid=$(ps -ef | grep 'keyword' | grep -v grep | awk '{print $2}') if [ -n "$pid" ]; then kill -9 $pid else echo "服务未启动" fi echo "重启新服务" cd /run-path/ sleep 1 echo "重启新服务" if [[ -f "${release_dir}build_last" ]]; then echo "存在新版本文件,尝试替换
https://www.bootcdn.cn/
sudo -u www bash -c 'php test.php -d "$(date +%Y-%m-%d)"'
查询执行时间超长的进程SELECT * FROM information_schema.PROCESSLIST WHERE command != 'Sleep' ORDER BY time DESC列出要结束的进程select concat('kill ', id, ';') from information_schema.processlist where command != 'Sleep' and time > 100 order by time desc执行列出的命令kill 1;
文本内容的文件提供下载function downloadFile(fileName, content) { // 定义触发事件的DOM var aLink = document.createElement('a'); // 创建文件 var file = new File([content], fileName, { type: 'application/x-msexcel' } ); // 判定平台 var isMac = navigator.userAgent.indexOf('Mac OS') > -1; // 定义事件对象 var evt = document.createEvent(isMac ? "MouseEvents" : "HTMLEvents"); // 初始化事件 // evt.initEvent("click", false, fals