Go to file
2020-09-11 18:14:13 +08:00
daemon.conf Initial submission 2020-09-11 16:40:25 +08:00
main.c Add configuration file options 2020-09-11 18:14:13 +08:00
main.h Initial submission 2020-09-11 16:40:25 +08:00
Makefile Initial submission 2020-09-11 16:40:25 +08:00
popen.c Initial submission 2020-09-11 16:40:25 +08:00
README.md Initial submission 2020-09-11 16:40:25 +08:00

Daemon

根据程序名称和时间为判断条件的进程守护程序.  
配置文件默认 daemon.conf  
global {
    PROCESS_NAME = "frpc";      //进程名称条件变量
    COMMAND = "ls -al";         //进程名称条件变量不成立执行的命令
    TIME = "10";                //时间条件变量, 单位秒
    LOFFILE = "log.txt";        //日志记录
}

Build

Linux编译:  
git clone https://github.com/niuyuling/daemon.git
git clone https://github.com/niuyuling/libconf.git
cd libconf
make clean; make
cd ../daemon
make clean; make

Help

#启动
./daemon
#关闭
killall daemon