diff --git a/installer/install2.sh b/installer/install2.sh index 73ed63fb..b18b944f 100755 --- a/installer/install2.sh +++ b/installer/install2.sh @@ -3,7 +3,7 @@ # T-Pot Community Edition post install script # # Ubuntu server 14.04, x64 # # # -# v0.42 by mo, DTAG, 2015-02-11 # +# v0.43 by mo, DTAG, 2015-02-16 # ######################################################## # Let's make sure there is a warning if running for a second time @@ -51,14 +51,6 @@ fuECHO "### Adding new user." addgroup --gid 2000 tpot adduser --system --no-create-home --uid 2000 --disabled-password --disabled-login --gid 2000 tpot -# Let's create some files and folders -fuECHO "### Creating some files and folders." -mkdir -p /data/ews/log /data/ews/conf /data/elk/data /data/elk/log - -# Let's modify some ownership / access rights -chmod 760 -R /data -chown tpot:tpot -R /data - # Let's set the hostname fuECHO "### Setting a new hostname." myHOST=ce$(date +%s)$RANDOM @@ -117,12 +109,20 @@ chmod 700 /root/tpotce/home/* chown tsec:tsec /root/tpotce/home/* chmod 644 /root/tpotce/upstart/* +# Let's create some files and folders +fuECHO "### Creating some files and folders." +mkdir -p /data/ews/log /data/ews/conf /data/elk/data /data/elk/log + # Let's move some files -mv /root/tpotce/bin/* /usr/bin/ -mv /root/tpotce/data/* /data/ -mv /root/tpotce/etc/issue /etc/ -mv /root/tpotce/home/* /home/tsec/ -mv /root/tpotce/upstart/* /etc/init/ +cp -R /root/tpotce/bin/* /usr/bin/ +cp -R /root/tpotce/data/* /data/ +cp -R /root/tpotce/etc/issue /etc/ +cp -R /root/tpotce/home/* /home/tsec/ +cp -R /root/tpotce/upstart/* /etc/init/ + +# Let's modify some ownership / access rights +chmod 660 -R /data +chown tpot:tpot -R /data # Final steps fuECHO "### Thanks for your patience. Now rebooting."