docker-desktop/start

25 lines
687 B
Plaintext
Raw Permalink Normal View History

2016-07-05 11:58:52 -07:00
#!/bin/sh
trap 'kill $(jobs -p)' EXIT
useradd --create-home --groups sudo $_IMG_USERNAME
echo "$_IMG_USERNAME:$_IMG_PASSWORD" | chpasswd
su -c "mkdir -p /home/${_IMG_USERNAME}/.vnc" $_IMG_USERNAME
su -c "echo '${_IMG_PASSWORD}' | vncpasswd -f > /home/${_IMG_USERNAME}/.vnc/passwd" ${_IMG_USERNAME}
chmod 700 /home/${_IMG_USERNAME}/.vnc
chmod 600 /home/${_IMG_USERNAME}/.vnc/passwd
#echo "user=${_IMG_USERNAME}" >> /etc/supervisor/conf.d/vncd.conf
#echo 'environment=HOME="'$_IMG_USERNAME'"' >> /etc/supervisor/conf.d/vncd.conf
su -c "vncserver -geometry 1280x800 :0" $_IMG_USERNAME
2016-07-13 22:45:06 -07:00
if [ -x "/mnt/persist/setup.sh" ] ; then
/mnt/persist/setup.sh &
sleep 5
2016-07-05 11:58:52 -07:00
fi
supervisord