mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
Merge 80976ea165 into 26b5cbafcd
This commit is contained in:
commit
7074b33ed3
25 changed files with 68 additions and 74 deletions
|
|
@ -73,10 +73,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
cp -r /etc/skel/.config /root/.config && \
|
||||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
cp /scripts/convert/policy.xml /etc/ImageMagick-6/policy.xml && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
|
|
|
|||
|
|
@ -55,11 +55,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
libmatroska-dev libdvdread-dev libebml5 libgav1-bin libatomic1 \
|
||||
iputils-ping dnsutils binutils binutils-gold \
|
||||
&& \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -79,10 +79,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
cp -r /etc/skel/.config /root/.config && \
|
||||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
cp /scripts/convert/policy.xml /etc/ImageMagick-6/policy.xml && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
|
|
|
|||
|
|
@ -75,11 +75,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
&& \
|
||||
/scripts/install-mariadb.sh mariadb-client && \
|
||||
/scripts/install-darktable.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -117,10 +117,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: ALL" >> /etc/sudoers.d/all && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -113,10 +113,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: ALL" >> /etc/sudoers.d/all && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -111,11 +111,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-chrome.sh && \
|
||||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: ALL" >> /etc/sudoers.d/all && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -59,11 +59,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-yt-dlp.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -87,10 +87,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
cp -r /etc/skel/.config /root/.config && \
|
||||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
cp /scripts/convert/policy.xml /etc/ImageMagick-6/policy.xml && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
|
|
|
|||
|
|
@ -54,11 +54,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-mariadb.sh mariadb-client && \
|
||||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -78,10 +78,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: ALL" >> /etc/sudoers.d/all && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
cp /scripts/convert/policy.xml /etc/ImageMagick-6/policy.xml && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
|
|
|
|||
|
|
@ -54,11 +54,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-mariadb.sh mariadb-client && \
|
||||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -78,10 +78,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: ALL" >> /etc/sudoers.d/all && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
cp /scripts/convert/policy.xml /etc/ImageMagick-6/policy.xml && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
|
|
|
|||
|
|
@ -56,11 +56,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-mariadb.sh mariadb-client && \
|
||||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -83,10 +83,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
cp -r /etc/skel/.config /root/.config && \
|
||||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
cp /scripts/convert/policy.xml /etc/ImageMagick-6/policy.xml && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
|
|
|
|||
|
|
@ -59,11 +59,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-mariadb.sh mariadb-client && \
|
||||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -86,10 +86,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
cp -r /etc/skel/.config /root/.config && \
|
||||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
cp /scripts/convert/policy.xml /etc/ImageMagick-6/policy.xml && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
|
|
|
|||
|
|
@ -60,11 +60,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-yt-dlp.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -92,10 +92,8 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
cp -r /etc/skel/.config /root/.config && \
|
||||
/scripts/install-go.sh && \
|
||||
/scripts/install-go-tools.sh && \
|
||||
echo 'alias go=richgo ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
cp /scripts/convert/policy.xml /etc/ImageMagick-7/policy.xml && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
|
|
|
|||
|
|
@ -114,11 +114,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
&& \
|
||||
/scripts/install-yt-dlp.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -117,11 +117,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
libavcodec-extra \
|
||||
&& \
|
||||
/scripts/install-darktable.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
|
|
@ -116,11 +116,9 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
libavcodec-extra \
|
||||
&& \
|
||||
/scripts/install-darktable.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
/scripts/install-bashrc.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
/scripts/install-dircolors.sh && \
|
||||
cp /etc/skel/.bashrc /root/.bashrc && \
|
||||
/scripts/create-users.sh && \
|
||||
install -d -m 0777 -o 1000 -g 1000 \
|
||||
/photoprism/originals \
|
||||
|
|
|
|||
16
scripts/dist/create-users.sh
vendored
16
scripts/dist/create-users.sh
vendored
|
|
@ -39,16 +39,23 @@ echo "✅ Added group photoprism (1000)."
|
|||
# add existing www-data user to groups
|
||||
usermod -a -G photoprism,video,davfs2,renderd,render,ssl-cert,videodriver www-data
|
||||
|
||||
# a directory that will be used as a custom skeleton when creating users
|
||||
SKELETON="/tmp/custom-skeleton"
|
||||
mkdir --parents "${SKELETON}"
|
||||
|
||||
# copy the .config/ directory from the default skeleton
|
||||
cp -r /etc/skel/.config/ ${SKELETON}/.config/
|
||||
|
||||
# create user 'videodriver'
|
||||
userdel -r -f videodriver >/dev/null 2>&1
|
||||
useradd -u 937 -r -N -g 937 -G photoprism,www-data,video,davfs2,renderd,render,ssl-cert -s /bin/bash -m -d "/home/videodriver" videodriver
|
||||
useradd -u 937 -r -N -g 937 -G photoprism,www-data,video,davfs2,renderd,render,ssl-cert -s /bin/bash -m -d "/home/videodriver" --skel "${SKELETON}" videodriver
|
||||
echo "✅ Added user videodriver (937)."
|
||||
|
||||
# create user 'photoprism'
|
||||
userdel -r -f ubuntu >/dev/null 2>&1
|
||||
userdel -r -f photoprism >/dev/null 2>&1
|
||||
userdel -r -f 1000 >/dev/null 2>&1
|
||||
useradd -u 1000 -N -g photoprism -G www-data,video,davfs2,renderd,render,ssl-cert,videodriver -s /bin/bash -m -d "/home/photoprism" photoprism
|
||||
useradd -u 1000 -N -g photoprism -G www-data,video,davfs2,renderd,render,ssl-cert,videodriver -s /bin/bash -m -d "/home/photoprism" --skel "${SKELETON}" photoprism
|
||||
echo "✅ Added user photoprism (1000)."
|
||||
|
||||
add_user()
|
||||
|
|
@ -56,7 +63,7 @@ add_user()
|
|||
userdel -r -f "user-$1" >/dev/null 2>&1
|
||||
groupdel -f "group-$1" >/dev/null 2>&1
|
||||
groupadd -f -g "$1" "group-$1"
|
||||
useradd -u "$1" -g "$1" -G photoprism,www-data,video,davfs2,renderd,render,ssl-cert,videodriver -s /bin/bash -m -d "/home/user-$1" "user-$1" 2>/dev/null
|
||||
useradd -u "$1" -g "$1" -G photoprism,www-data,video,davfs2,renderd,render,ssl-cert,videodriver -s /bin/bash -m -d "/home/user-$1" --skel "${SKELETON}" "user-$1" 2>/dev/null
|
||||
printf "."
|
||||
}
|
||||
|
||||
|
|
@ -73,4 +80,7 @@ printf " ✔\n"
|
|||
|
||||
chgrp -f -R 1000 /home
|
||||
|
||||
# remove the custom skeleton
|
||||
rm -rf "${SKELETON}"
|
||||
|
||||
echo "Done."
|
||||
|
|
|
|||
28
scripts/dist/install-bashrc.sh
vendored
Executable file
28
scripts/dist/install-bashrc.sh
vendored
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Add go alias and custom prompt in /etc/bash.bashrc:
|
||||
# bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-profile.sh)
|
||||
|
||||
# Abort if not executed as root.
|
||||
if [[ $(id -u) != "0" ]]; then
|
||||
echo "Usage: run ${0##*/} as root" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
echo "Add ll alias and custom prompt in /etc/bash.bashrc"
|
||||
|
||||
echo 'alias ll="ls -alh"' >> /etc/bash.bashrc
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/bash.bashrc
|
||||
|
||||
echo "Add alias of go to richgo if it's available"
|
||||
|
||||
# Source: https://stackoverflow.com/questions/592620/how-can-i-check-if-a-program-exists-from-a-bash-script/677212#677212
|
||||
if command -v richgo >/dev/null 2>&1; then
|
||||
echo 'alias go=richgo' >> /etc/bash.bashrc
|
||||
fi
|
||||
|
||||
echo "Remove the unnecessary custom .bashrc for the root user"
|
||||
|
||||
rm /root/.bashrc
|
||||
10
scripts/dist/install-dircolors.sh
vendored
10
scripts/dist/install-dircolors.sh
vendored
|
|
@ -298,13 +298,13 @@ EOF
|
|||
# Make sure file only writable by root, but readable by everyone
|
||||
chmod 644 /etc/dir_colors
|
||||
|
||||
# Activate colors in /etc/skel/.bashrc, if not done yet
|
||||
if ! grep -q 'export SHELL=/bin/bash' /etc/skel/.bashrc; then
|
||||
echo 'export SHELL=/bin/bash' >> /etc/skel/.bashrc
|
||||
# Activate colors in /etc/bash.bashrc, if not done yet
|
||||
if ! grep -q 'export SHELL=/bin/bash' /etc/bash.bashrc; then
|
||||
echo 'export SHELL=/bin/bash' >> /etc/bash.bashrc
|
||||
fi
|
||||
# shellcheck disable=SC2016
|
||||
if ! grep -q 'eval "$(dircolors /etc/dir_colors)"' /etc/skel/.bashrc; then
|
||||
echo 'eval "$(dircolors /etc/dir_colors)"' >> /etc/skel/.bashrc
|
||||
if ! grep -q 'eval "$(dircolors /etc/dir_colors)"' /etc/bash.bashrc; then
|
||||
echo 'eval "$(dircolors /etc/dir_colors)"' >> /etc/bash.bashrc
|
||||
fi
|
||||
|
||||
echo "Done."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue