forked from oofnikj/docker-openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (23 loc) · 755 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.PHONY: build run clean install uninstall
include openwrt.conf
export
build:
./build.sh
run:
./run.sh
clean:
docker stop ${CONTAINER} || true
docker rm ${CONTAINER} || true
docker network rm ${LAN_NAME} ${WAN_NAME} || true
install:
install -Dm644 openwrt.service /usr/lib/systemd/system/openwrt.service
sed -i -E "s#(ExecStart=).*#\1`pwd`/run.sh#g" /usr/lib/systemd/system/openwrt.service
systemctl daemon-reload
systemctl enable openwrt.service
@echo "OpenWrt service installed and will be started on next boot automatically."
@echo "To start it now, run 'systemctl start openwrt.service'."
uninstall:
systemctl stop openwrt.service
systemctl disable openwrt.service
rm /usr/lib/systemd/system/openwrt.service
systemctl daemon-reload