commit 95bdf4e03f09e36673b5b3ef2161cfa59e171b55
parent 20259ad5986d5b85b20ac9b0ac337dcb258c37e9
Author: Ari Malinen <ari.malinen@gmail.com>
Date: Tue, 10 Jun 2014 21:14:00 +0300
init
Diffstat:
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -5,11 +5,13 @@ all: dcron
install: dcron
mkdir -p ${DESTDIR}/bin
install -m 755 dcron ${DESTDIR}/bin/
- install -m 755 init.d/dcron /etc/init.d/
+ install -m 755 init.d/dcron ${DESTDIR}/etc/init.d/
+ install -m 644 dcron.conf ${DESTDIR}/etc/
uninstall:
rm -f ${DESTDIR}/bin/dcron
- rm /etc/init.d/dcron
+ rm ${DESTDIR}/etc/init.d/dcron
+ rm ${DESTDIR}/etc/dcron.conf
clean:
rm dcron
diff --git a/dcron.c b/dcron.c
@@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
}
openlog(argv[0], LOG_CONS | LOG_PID, LOG_LOCAL1);
- syslog(LOG_NOTICE, "started by user %d", getuid());
+ syslog(LOG_NOTICE, "start uid:%d", getuid());
while (1) {
t = time(NULL);
@@ -107,6 +107,7 @@ int main(int argc, char *argv[]) {
}
sleep(SLEEP);
}
+ syslog(LOG_NOTICE, "quit");
closelog();
fclose(fp);
return 0;