Browse Source

Check user before creating it

Just so that customize-inner.sh is idempotent
tags/nilmbuntu-5
Jim Paris 7 years ago
parent
commit
0c439a1643
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      customize-inner.sh

+ 3
- 1
customize-inner.sh View File

@@ -202,7 +202,9 @@ EOF
# Create NILM user. This should happen after anything that we put in # Create NILM user. This should happen after anything that we put in
# /etc/skel, since files get copied from there. Note that this user # /etc/skel, since files get copied from there. Note that this user
# is the same as what we have in the preseed file and casper.conf # is the same as what we have in the preseed file and casper.conf
adduser --gecos "NILM User" --disabled-password nilm
if ! getent passwd nilm ; then
adduser --gecos "NILM User" --disabled-password nilm
fi


# Make sure locate databases are up-to-date # Make sure locate databases are up-to-date
/etc/cron.daily/mlocate /etc/cron.daily/mlocate


Loading…
Cancel
Save