Skip to content

Commit 8cfebd6

Browse files
authored
Makefile: breakout option to add user
1 parent 906ba61 commit 8cfebd6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ MSCS_COMPLETION := /etc/bash_completion.d/mscs
99

1010
UPDATE_D := $(wildcard update.d/*)
1111

12-
.PHONY: install update clean
12+
.PHONY: install adduser update clean
1313

14-
install: update
15-
useradd --system --user-group --create-home -K UMASK=0022 --home $(MSCS_HOME) $(MSCS_USER)
14+
install: adduser update
1615
if which systemctl; then \
1716
systemctl -f enable mscs.service; \
1817
else \
1918
ln -s $(MSCS) $(MSCS_INIT_D); \
2019
update-rc.d mscs defaults; \
2120
fi
21+
22+
adduser:
23+
useradd --system --user-group --create-home -K UMASK=0022 --home $(MSCS_HOME) $(MSCS_USER)
2224

2325
update:
2426
install -m 0755 msctl $(MSCTL)

0 commit comments

Comments
 (0)