-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from proditis/master
style(9) and work towards supporting OpenBSD ports system
- Loading branch information
Showing
11 changed files
with
68 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,8 @@ | ||
# Build the diverters dont write this with eclipse :P | ||
# SAMPLE needs work | ||
# | ||
|
||
BINDIR = /usr/local/sbin | ||
|
||
all: bofh-divert dnsbl-divert | ||
|
||
install: install-bofh install-dnsbl | ||
|
||
uninstall: uninstall-bofh uninstall-dnsbl | ||
|
||
clean: | ||
rm -rf stdpf.o daemon.o dnsbl-divert bofh-divert | ||
|
||
bofh-divert: bofh-divert.c daemon.o stdpf.o | ||
gcc -o bofh-divert bofh-divert.c daemon.o stdpf.o | ||
|
||
dnsbl-divert: dnsbl-divert.c daemon.o stdpf.o | ||
gcc -o dnsbl-divert dnsbl-divert.c daemon.o stdpf.o | ||
|
||
daemon.o: daemon.c | ||
gcc -c daemon.c | ||
|
||
stdpf.o: stdpf.c | ||
gcc -c stdpf.c | ||
|
||
install-bofh: | ||
install -Ss -o root -g wheel -m 750 bofh-divert $(BINDIR)/bofh-divert | ||
install -o root -g wheel -m 750 rc.bofh /etc/rc.d/bofh_divert | ||
|
||
install-dnsbl: | ||
install -Ss -o root -g wheel -m 750 dnsbl-divert $(BINDIR)/dnsbl-divert | ||
install -o root -g wheel -m 750 rc.dnsbl /etc/rc.d/dnsbl_divert | ||
|
||
uninstall-bofh: | ||
rm $(BINDIR)/bofh-divert /etc/rc.d/rc.bofh | ||
|
||
uninstall-dnsbl: | ||
rm $(BINDIR)/dnsbl-divert /etc/rc.d/rc.dnsbl | ||
# taken from pfstatd | ||
SUBDIR= bofh | ||
SUBDIR+= dnsbl | ||
#SUBDIR+= heartbleed | ||
CFLAGS+= -Wall | ||
CFLAGS+= -I${.CURDIR} | ||
|
||
.include <bsd.prog.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# taken from pfstatd | ||
PROG= bofh-divert | ||
SRCS= bofh-divert.c daemon.c stdpf.c | ||
MAN= | ||
.PATH: ${.CURDIR}/.. | ||
CFLAGS+= -Wall | ||
CFLAGS+= -I${.CURDIR}/.. | ||
|
||
.include <bsd.prog.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#ifndef DAEMON_H | ||
#define DAEMON_H 1 | ||
void daemonShutdown(); | ||
void signal_handler(int sig); | ||
void daemonize(char *rundir, char *pidfile); | ||
void signal_handler(int); | ||
void daemonize(char *, char *); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# taken from pfstatd | ||
PROG= dnsbl-divert | ||
SRCS= dnsbl-divert.c daemon.c stdpf.c | ||
MAN= | ||
.PATH: ${.CURDIR}/.. | ||
CFLAGS+= -Wall | ||
CFLAGS+= -I${.CURDIR}/.. | ||
|
||
.include <bsd.prog.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# taken from pfstatd | ||
PROG= heartbleed-divert | ||
SRCS= heartbleed-divert.c | ||
#MAN= pfstatd.8 | ||
.PATH: ${.CURDIR}/.. | ||
CFLAGS+= -Wall | ||
CFLAGS+= -I${.CURDIR}/.. | ||
|
||
.include <bsd.prog.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters