netcup-dns/Makefile

30 lines
697 B
Makefile
Raw Normal View History

2023-03-28 17:18:30 +02:00
PKGNAME := netcup-dns
.PHONY: all
all: install
.PHONY: install
install: notify cron
sudo python3 -m pip install --upgrade --force-reinstall .
sudo install -m0644 cron.d/$(PKGNAME) /etc/cron.d/$(PKGNAME)
sudo install --directory -m755 /etc/$(PKGNAME)/
sudo install -m0644 cfg/* /etc/$(PKGNAME)/
.PHONY: notify ## Check if execNotify is installed.
notify:
# `type` does not work e.g. on Ubuntu 18.04
which de-p1st-execNotify
.PHONY: cron ## Check if cron (e.g. cronie) is running.
cron:
# Check if cron.d exists
stat /etc/cron.d/
# Check if cron is running
pgrep cron
.PHONY: clean
clean:
sudo python3 -m pip uninstall -y $(PKGNAME)
rm -rf /etc/cron.d/$(PKGNAME) /etc/$(PKGNAME)