-
Notifications
You must be signed in to change notification settings - Fork 0
/
startup.sh
23 lines (19 loc) · 848 Bytes
/
startup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
mkdir -p /var/run/sshd
# create an ubuntu user
# PASS=`pwgen -c -n -1 10`
PASS=ubuntu
# echo "Username: ubuntu Password: $PASS"
id -u ubuntu &>/dev/null || useradd --create-home --shell /bin/bash --user-group --groups adm,sudo ubuntu
echo "ubuntu:$PASS" | chpasswd
sudo -u ubuntu -i bash -c "mkdir -p /home/ubuntu/.config/pcmanfm/LXDE/ \
&& cp /usr/share/doro-lxde-wallpapers/desktop-items-0.conf /home/ubuntu/.config/pcmanfm/LXDE/"
sudo -u ubuntu mkdir -p /home/ubuntu/.vnc
#sudo -u ubuntu chown ubuntu:ubuntu -R /home/ubuntu/.vnc
chmod 755 -R /home/ubuntu/.vnc
sudo -u ubuntu cp /test-configs/xstartup /home/ubuntu/.vnc/xstartup
#sudo -u ubuntu chown ubuntu:ubuntu -R /home/ubuntu/.vnc
chmod 755 -R /home/ubuntu/.vnc
cd /web && ./run.py > /var/log/web.log 2>&1 &
nginx -c /etc/nginx/nginx.conf
exec /usr/bin/supervisord -n