添加自定时脚本示例

This commit is contained in:
whyour 2021-05-11 11:01:41 +08:00
parent 665ed19cff
commit ca2bda67b8
2 changed files with 6 additions and 2 deletions

3
sample/extra.sample.sh Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
## 添加你需要重启自动执行的任意命令,比如 ql bot、ql repo

View File

@ -23,6 +23,7 @@ file_config_user=$dir_config/config.sh
file_auth_sample=$dir_sample/auth.sample.json
file_auth_user=$dir_config/auth.json
file_extra_shell=$dir_config/extra.sh
file_extra_sample=$dir_sample/extra.sample.sh
file_notify_js_sample=$dir_sample/notify.js
file_notify_py_sample=$dir_sample/notify.py
file_notify_py=$dir_scripts/notify.py
@ -163,8 +164,8 @@ fix_config() {
fi
if [ ! -f $file_extra_shell ]; then
echo -e "检测到config配置目录下不存在extra.sh创建一个空文件用于初始化...\n"
touch $file_extra_shell
echo -e "复制一份 $file_extra_sample$file_extra_shell\n"
cp -fv $file_extra_sample $file_extra_shell
echo
fi