added pmbuild for dnsmasq

This commit is contained in:
wt committed 2025-05-10 19:26:53 +07:00
1 parent 06e1c7708e
commit 7d7511beb5
3 files changed
+61

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
notify "Starting dnsmasq"
/usr/bin/dnsmasq --user=dnsmasq --pid-file=/var/run/dnsmasq.pid
check $? "start dnsmasq"
return $?
}
stop() {
notify "Stopping dnsmasq"
kill $(cat /var/run/dnsmasq.pid)
check $? "stop dnsmasq"
rm /var/run/dnsmasq.pid &> /dev/null
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
;;
esac
return $?