Skip to content

Commit

Permalink
inithook fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JedMeister committed Oct 15, 2018
1 parent cc9b10a commit b68eb21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions overlay/usr/lib/inithooks/bin/sambaconf_add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ rm -f $CONF
rm -f /etc/krb5.conf

# clean up *.tdb and *.ldb files (samba DBs)
DIRS=$(smbd -b | egrep "LOCKDIR|STATEDIR|CACHEDIR|PRIVATE_DIR")
DIRS=$(smbd -b | egrep "LOCKDIR|STATEDIR|CACHEDIR|PRIVATE_DIR" | cut -d: -f2)
for dir in $DIRS; do
find $dir \( -name "*.tdb" -or -name "*.ldb" \) -delete
find $dir \( -name "*.tdb" -or -name "*.ldb" \) -delete || true
done

samba-tool domain provision --realm $REALM --domain $DOMAIN --adminpass $ADMIN_PASSWORD --server-role=dc --use-rfc2307 --option="dns forwarder = 8.8.8.8"
Expand Down
4 changes: 2 additions & 2 deletions overlay/usr/lib/inithooks/bin/sambaconf_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ rm -f $CONF
rm -f /etc/krb5.conf

# clean up *.tdb and *.ldb files (samba DBs)
DIRS=$(smbd -b | egrep "LOCKDIR|STATEDIR|CACHEDIR|PRIVATE_DIR")
DIRS=$(smbd -b | egrep "LOCKDIR|STATEDIR|CACHEDIR|PRIVATE_DIR" | cut -d: -f2)
for dir in $DIRS; do
find $dir \( -name "*.tdb" -or -name "*.ldb" \) -delete
find $dir \( -name "*.tdb" -or -name "*.ldb" \) -delete || true
done

samba-tool domain join $REALM DC -U"$DOMAIN\\$ADMIN_USER" --password=$ADMIN_PASSWORD --dns-backend=SAMBA_INTERNAL
Expand Down

0 comments on commit b68eb21

Please sign in to comment.