mirror of
https://github.com/MinecraftServerControl/mscs.git
synced 2024-11-15 06:48:16 -07:00
Merge pull request #320 from sptoothman/patch-1
Updated Makefile with a safety check for user
This commit is contained in:
commit
336fb8386f
7
Makefile
7
Makefile
@ -21,7 +21,12 @@ install: adduser update
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
adduser:
|
adduser:
|
||||||
useradd --system --user-group --create-home -K UMASK=0022 --home $(MSCS_HOME) $(MSCS_USER)
|
# safety check to see if user exists before trying to create it
|
||||||
|
if id $(MSCS_USER); then \
|
||||||
|
echo "Minecraft user $(MSCS_USER) exists so not creating it"; \
|
||||||
|
else \
|
||||||
|
useradd --system --user-group --create-home -K UMASK=0022 --home $(MSCS_HOME) $(MSCS_USER); \
|
||||||
|
fi
|
||||||
|
|
||||||
update:
|
update:
|
||||||
install -m 0755 msctl $(MSCTL)
|
install -m 0755 msctl $(MSCTL)
|
||||||
|
Loading…
Reference in New Issue
Block a user