summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJason Fesler <jfesler@vm2.test-ipv6.com>2016-06-04 10:14:01 -0700
committerJason Fesler <jfesler@vm2.test-ipv6.com>2016-06-04 10:14:01 -0700
commit5befc51198fd78dffdb8887c964d94909167befd (patch)
tree0cc3b696bfe5d39223714248de3bda61be0b0a47 /Makefile
parentb705374ef9fd9795760e195f35ec30e59a53028b (diff)
downloadmtu1280d-5befc51198fd78dffdb8887c964d94909167befd.tar.gz
mtu1280d-5befc51198fd78dffdb8887c964d94909167befd.zip
systemd barged in, uninvited
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 6babfc8..b685d6d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,10 @@ help:
@echo "make install - installs to /usr/sbin/mtu1280d"
@echo "make upstart - installs, including /etc/init/ script"
@echo "make init.d - installs, including /etc/init.d/ and runs chkconfig"
- @test -d /etc/init && echo "RECOMMENDATION: make upstart (we found /etc/init)" || true
- @test ! -d /etc/init && echo "RECOMMENDATION: make init.d (we did not find /etc/init)" || true
+ @echo "make systemd - installs using systemd"
+ @test -d /lib/systemd/system/ && echo "RECOMMENDATION: make systemd (we found /lib/systemd/system/)" || true
+ @test -d /etc/init && test ! -d /lib/systemd/system/ && echo "RECOMMENDATION: make upstart (we found /etc/init)" || true
+ @test ! -d /etc/init && test ! -d /lib/systemd/system/ && echo "RECOMMENDATION: make init.d (we did not find /etc/init)" || true
mtu1280d: mtu1280d.c
gcc -o mtu1280d mtu1280d.c -lnetfilter_queue || ( echo "see README.md for prerequisites" && exit 1 )
@@ -17,7 +19,7 @@ clean:
rm -f mtu1280d
install: mtu1280d
- /usr/bin/install -c mtu1280d /usr/sbin/
+ sudo /usr/bin/install -c mtu1280d /usr/sbin/
upstart: install
@echo Checking to see if your system uses upstart
@@ -32,6 +34,12 @@ init.d: install
@echo "Reminder - start the daemon or reboot; then update your ip6tables."
@echo "See the README.md file."
+systemd: install
+ sudo cp systemd/mtu1280d.service /lib/systemd/system/mtu1280d.service
+ #sudo systemctl daemon-reload
+ sudo systemctl enable mtu1280d.service
+ sudo systemctl restart mtu1280d.service
+
################################################################
# Removing? Check ip6tables first #