From 89a9ead331bcd555d3be6cccafa8709097dd63d7 Mon Sep 17 00:00:00 2001 From: Artur Meski Date: Sun, 22 Dec 2024 23:01:30 +0000 Subject: [PATCH] Working version --- install.sh | 10 ++++++++++ rc.d/dhcpleasemon | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100755 install.sh create mode 100755 rc.d/dhcpleasemon diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..d49aa0e --- /dev/null +++ b/install.sh @@ -0,0 +1,10 @@ +#!/bin/ksh + +pname="dhcpleasemon" + +cargo build --release + +install -o root -g wheel -d /etc/$pname +install -o root -g bin target/release/$pname /usr/local/sbin/$pname +install -o root -g wheel -m 0555 rc.d/$pname /etc/rc.d/$pname + diff --git a/rc.d/dhcpleasemon b/rc.d/dhcpleasemon new file mode 100755 index 0000000..ec34efb --- /dev/null +++ b/rc.d/dhcpleasemon @@ -0,0 +1,7 @@ +#!/bin/ksh + +daemon="/usr/local/sbin/dhcpleasemon" + +. /etc/rc.d/rc.subr + +rc_cmd $1