29 lines
1.3 KiB
Makefile
29 lines
1.3 KiB
Makefile
ADMIN_NAME ?= dnsmanager
|
|
|
|
create-admin-account:
|
|
@echo "SETUP ACCOUNT: dnsmanager"
|
|
cd $(DIR_AUTHD) && make add-first-user NAME=$(ADMIN_NAME) EMAIL='root@localhost'
|
|
|
|
create-user-account:
|
|
@echo "SETUP ACCOUNT: karchnu"
|
|
cd $(DIR_AUTHD) && make add-user NAME=karchnu EMAIL=karchnu@karchnu.fr LOGIN=$(ADMIN_NAME)
|
|
|
|
UID ?= 0
|
|
setup-dnsmanagerd-admin-permissions:
|
|
[ "$(UID)" = "0" ] && echo "Error: default UID, please change the UID variable" && exit 1
|
|
@echo "SETUP permissions: admin on 'dnsmanager' '*' to user-id $(UID)"
|
|
@echo "(this can be setup with the UID var)"
|
|
cd $(DIR_AUTHD) && make permission-set UID=$(UID) SERVICE="dnsmanager" RESOURCE='\*' PERMISSION="Admin" LOGIN=$(ADMIN_NAME)
|
|
|
|
setup-dnsmanagerd-admin-permissions-dnsmanager:
|
|
@echo "SETUP dnsmanagerd administrator account permissions in authd (account named 'dnsmanager', UID 1000)"
|
|
@#make setup-dnsmanagerd-admin-permissions UID=1000
|
|
cd $(DIR_AUTHD) && make permission-set UID=1000 SERVICE="dnsmanager" RESOURCE='\*' PERMISSION="Admin" LOGIN=$(ADMIN_NAME)
|
|
|
|
setup-a-few-accounts: create-admin-account create-user-account setup-dnsmanagerd-admin-permissions-dnsmanager
|
|
|
|
# The two most useful rules.
|
|
setup-admin-account: create-admin-account setup-dnsmanagerd-admin-permissions-dnsmanager
|
|
run-authd:
|
|
cd $(DIR_AUTHD) && make run-authd
|