18 lines
590 B
Makefile
18 lines
590 B
Makefile
CONFIG=cgconfig.conf cgred.conf cgrules.conf
|
|
CONFIG_DIR=/etc
|
|
|
|
SERVICES=cgconfigparser.service cgrulesgend.service
|
|
SYSTEMD_DIR=/lib/systemd/system
|
|
|
|
install:
|
|
cp $(CONFIG) $(CONFIG_DIR)
|
|
cp $(SERVICES) $(SYSTEMD_DIR)
|
|
$(foreach service,$(SERVICES), systemctl enable $(service);)
|
|
$(foreach service,$(SERVICES), systemctl start $(service);)
|
|
|
|
clean:
|
|
$(foreach config,$(CONFIG), rm $(CONFIG_DIR)/$(config);)
|
|
$(foreach service,$(SERVICES), systemctl stop $(service);)
|
|
$(foreach service,$(SERVICES), systemctl disable $(service);)
|
|
$(foreach service,$(SERVICES), rm $(SYSTEMD_DIR)/$(service);)
|