Merge branch 'master' of https://git.johnhgaunt.com/jgaunt/homelab-scripts
This commit is contained in:
@@ -34,14 +34,25 @@ elif [ "${OS}" == "CentOS" ]; then
|
||||
echo ${password} | realm join --user=${username} --computer-ou=OU=Servers ${domain}
|
||||
fi
|
||||
|
||||
# Get hostname
|
||||
hostname=$(hostnamectl | awk '/Static hostname:/ {print $3}')
|
||||
|
||||
# set the sssd options
|
||||
# don't require the full domain for the usernames
|
||||
sed --in-place 's/^use_fully_qualified_names = True/use_fully_qualified_names = False/' /etc/sssd/sssd.conf
|
||||
# set home directory to /home/<username>
|
||||
sed --in-place 's/^fallback_homedir = \/home\/%u@%d/fallback_homedir = \/home\/%u/' /etc/sssd/sssd.conf
|
||||
# change the provider to simple and then only allow the server admins to login
|
||||
sed --in-place 's/^access_provider = ad/access_provider = simple\nsimple_allow_groups = Server Admins/' /etc/sssd/sssd.conf
|
||||
# set the sssd options for our domain
|
||||
cat <<EOF > "/etc/sssd/conf.d/${netbiosname}.conf"
|
||||
[domain/${domain}]
|
||||
use_fully_qualified_names = False
|
||||
fallback_homedir = /home/%u
|
||||
access_provider = simple
|
||||
simple_allow_groups = Domain Admins, Server Admins
|
||||
ad_hostname = ${hostname}.${domain}
|
||||
dyndns_update = true
|
||||
dyndns_refresh_interval = 43200
|
||||
dyndns_update_ptr = true
|
||||
dyndns_ttl = 3600
|
||||
EOF
|
||||
|
||||
# make sure the permissions are correct
|
||||
chmod 600 "/etc/sssd/conf.d/${netbiosname}.conf"
|
||||
|
||||
# reboot sssd
|
||||
systemctl restart sssd
|
||||
|
||||
@@ -159,7 +159,7 @@ readarr-ebooks () {
|
||||
-e TZ=America/New_York \
|
||||
-p 8787:8787 \
|
||||
--restart=always \
|
||||
lscr.io/linuxserver/readarr:develop
|
||||
binhex/arch-readarr
|
||||
docker start readarr-ebooks
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ readarr-audiobooks () {
|
||||
-e TZ=America/New_York \
|
||||
-p 8788:8787 \
|
||||
--restart=always \
|
||||
lscr.io/linuxserver/readarr:develop
|
||||
binhex/arch-readarr
|
||||
docker start readarr-audiobooks
|
||||
}
|
||||
|
||||
@@ -282,4 +282,21 @@ wizarr () {
|
||||
--restart unless-stopped \
|
||||
ghcr.io/wizarrrr/wizarr
|
||||
docker start wizarr
|
||||
}
|
||||
|
||||
lazylibrarian () {
|
||||
docker stop lazylibrarian
|
||||
docker rm lazylibrarian
|
||||
docker create \
|
||||
--name=lazylibrarian \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TTZ=America/New_York \
|
||||
-p 5299:5299 \
|
||||
-v /etc/docker/config/lazylibrarian:/config \
|
||||
-v /media/downloads:/downloads \
|
||||
-v /mnt/media/audiobooks:/books \
|
||||
--restart unless-stopped \
|
||||
lscr.io/linuxserver/lazylibrarian:latest
|
||||
docker start lazylibrarian
|
||||
}
|
||||
Reference in New Issue
Block a user