Created
April 19, 2019 02:41
-
-
Save sangdongvan/1322837fcc24398c101300cee1268007 to your computer and use it in GitHub Desktop.
ubuntu check and create group/user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ubuntu | |
# check that owner group exists | |
if [ -z `getent group spinnaker` ]; then | |
groupadd spinnaker | |
fi | |
# check that user exists | |
if [ -z `getent passwd spinnaker` ]; then | |
useradd --gid spinnaker spinnaker -m --home-dir /home/spinnaker | |
fi | |
install --mode=755 --owner=spinnaker --group=spinnaker --directory /var/log/spinnaker/fiat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment