mirror of
https://github.com/fcwu/docker-ubuntu-vnc-desktop
synced 2025-12-08 01:15:38 +01:00
Update startup.sh
This commit is contained in:
parent
fde64eaccd
commit
b937ce3748
1 changed files with 2 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ HOME=/root
|
|||
if [ "$USER" != "root" ]; then
|
||||
echo "* enable custom user: $USER"
|
||||
#useradd --create-home --shell /bin/bash --user-group --groups adm,sudo,docker -d /workspace/.home/$USER $USER
|
||||
useradd --create-home --shell /bin/bash --user-group --groups adm,sudo,docker $USER
|
||||
useradd --create-home --shell /bin/bash --user-group --groups adm,sudo,docker $(if [ -z $PUID ]; then echo "--uid $PUID"; fi) $(if [ -z $PGID ]; then echo "--gid $PGID"; fi) $USER
|
||||
|
||||
if [ -z "$PASSWORD" ]; then
|
||||
echo " set default password to \"ubuntu\""
|
||||
|
|
@ -43,11 +43,11 @@ if [ "$USER" != "root" ]; then
|
|||
|
||||
PASSWORD=$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)
|
||||
fi
|
||||
|
||||
#HOME=/workspace/.home/$USER
|
||||
HOME=/home/$USER
|
||||
echo "$USER:$PASSWORD" | chpasswd
|
||||
cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME}
|
||||
chown -R $USER:$USER ${HOME}
|
||||
[ -d "/dev/snd" ] && chgrp -R adm /dev/snd
|
||||
fi
|
||||
sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf
|
||||
|
|
@ -134,6 +134,4 @@ grep "file:///home/$USER/Downloads" /home/$USER/.config/gtk-3.0/bookmarks || ech
|
|||
|
||||
grep "127.0.0.1 archive.linux.duke.edu" /etc/hosts || echo "127.0.0.1 archive.linux.duke.edu" >> /etc/hosts
|
||||
|
||||
chown -R $USER:$USER /home/$USER/
|
||||
|
||||
exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf
|
||||
|
|
|
|||
Loading…
Reference in a new issue