mirror of
https://codeberg.org/privacy1st/netcup-dns
synced 2024-12-22 23:36:04 +01:00
feat: Makefile
This commit is contained in:
parent
4e8c976eef
commit
9ac720ef31
29
Makefile
Normal file
29
Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
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)
|
Loading…
Reference in New Issue
Block a user