makepac/Makefile

38 lines
1.0 KiB
Makefile
Raw Normal View History

2022-07-27 22:45:40 -04:00
.PHONY: help
help: ## Show this help
2022-08-15 21:01:09 -04:00
@echo 'makepac'
2022-07-27 22:45:40 -04:00
@echo '--------'
2022-08-17 00:14:42 -04:00
@echo 'Simple configuration manager'
2022-07-27 22:45:40 -04:00
@echo ''
2022-08-17 00:14:42 -04:00
@echo 'See https://gitlab.com/balki/makepac for usage'
2022-07-27 22:45:40 -04:00
@echo ''
@#https://stackoverflow.com/a/47107132
@sed -ne '/@sed/!s/## //p' $(MAKEFILE_LIST) | column -tl 2
.PHONY: install
2022-08-17 00:14:42 -04:00
install: ## Symlinks files in root/ to real root
2022-07-28 14:55:41 -04:00
sudo ./makepac/install.sh
2022-07-27 22:45:40 -04:00
.PHONY: sd-reload
sd-reload: ## Run this after editing systemd service/timer files
sudo systemctl daemon-reload
.PHONY: sd-users
sd-users: ## Run this after adding new users
sudo systemctl restart systemd-sysusers.service
.PHONY: save-perms
save-perms: ## Saves the file permissions to ./acl. Run this after adding new files with correct permissions
getfacl --recursive root > acl
.PHONY: set-perms
2022-08-17 00:14:42 -04:00
set-perms: ## Restores permissions of all files from ./acl
2022-07-27 22:45:40 -04:00
sudo setfacl --restore acl
.PHONY: skel
skel: ## Creates common directories needed
mkdir -p root/etc/
mkdir -p root/usr/local/bin
mkdir -p root/usr/local/lib/systemd/system
mkdir -p root/usr/local/lib/sysusers.d