2020-02-25 10:54:05 +00:00
|
|
|
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:
|
2020-02-25 13:02:17 +00:00
|
|
|
$(foreach config,$(CONFIG), rm $(CONFIG_DIR)/$(config);)
|
2020-02-25 10:54:05 +00:00
|
|
|
$(foreach service,$(SERVICES), systemctl stop $(service);)
|
|
|
|
$(foreach service,$(SERVICES), systemctl disable $(service);)
|
2020-02-25 13:02:17 +00:00
|
|
|
$(foreach service,$(SERVICES), rm $(SYSTEMD_DIR)/$(service);)
|