mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
image: Install Monkey (web server)
This commit is contained in:
13
builder/assets/index.html
Normal file
13
builder/assets/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<h1>CLEVER Drone Kit Tools</h1>
|
||||
|
||||
<ul>
|
||||
<!-- <li><a href="">View user reference</a> (<a href="http://clever.copterexpress.com">http://clever.copterexpress.com</a> snapshot)</li> -->
|
||||
<li><a href="" id="wvs">View image topics</a> (<code>web_video_server</code>)</li>
|
||||
<li><a href="" id="butterfly">Open web terminal</a> (<code>Butterfly</code>)</li>
|
||||
<!-- <li><a href="viz.html">View 3D visualization</a> (<code>ros3djs</code>)</li> -->
|
||||
</ul>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.querySelector("#wvs").href = location.origin + ':8080';
|
||||
document.querySelector("#butterfly").href = location.origin + ':57575';
|
||||
</script>
|
||||
57
builder/assets/monkey-clever
Normal file
57
builder/assets/monkey-clever
Normal file
@@ -0,0 +1,57 @@
|
||||
# Default Host - Configuration
|
||||
# ============================
|
||||
# Here the variable principals of the program are defined in respect
|
||||
# to the configuration of the different types of directives.
|
||||
|
||||
[HOST]
|
||||
# ServerName:
|
||||
# -----------
|
||||
# Allow you to set a host and domain name (e.g monkey.linuxchile.cl). If
|
||||
# you are working in a local network just set your IP address or if you
|
||||
# are working like localhost set your loopback address (127.0.0.1).
|
||||
|
||||
ServerName 0.0.0.0
|
||||
|
||||
# DocumentRoot:
|
||||
# -------------
|
||||
# This variable corresponds to the location of the main server directory
|
||||
# of the web pages, where the files of your site are located.
|
||||
#
|
||||
# Example:
|
||||
# DocumentRoot /home/krypton/htdocs
|
||||
|
||||
DocumentRoot /root/monkey-static
|
||||
|
||||
# Redirect:
|
||||
# ---------
|
||||
# Under specific conditions, you may want the server performs a HTTP
|
||||
# redirect when this Virtual Host is reach. If that is the case, append
|
||||
# to the Redirect key the value of the address where to redirect the
|
||||
# HTTP client.
|
||||
#
|
||||
# Redirect http://monkey-project.com
|
||||
|
||||
[LOGGER]
|
||||
# AccessLog:
|
||||
# ----------
|
||||
# Registration file of correct request.
|
||||
|
||||
AccessLog /var/log/monkey-clever/access.log
|
||||
|
||||
# ErrorLog:
|
||||
# ---------
|
||||
# Registration file of incorrect request.
|
||||
|
||||
ErrorLog /var/log/monkey-clever/error.log
|
||||
|
||||
[ERROR_PAGES]
|
||||
404 404.html
|
||||
|
||||
[HANDLERS]
|
||||
# FastCGI
|
||||
# =======
|
||||
# Match /.*\.php fastcgi
|
||||
|
||||
# CGI
|
||||
# ===
|
||||
# Match /cgi-bin/.*\.cgi cgi
|
||||
@@ -83,6 +83,11 @@ ${BUILDER_DIR}/image-resize.sh ${IMAGE_PATH} max '7G'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/init_rpi.sh' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/hardware_setup.sh' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-init.sh' ${IMAGE_VERSION} ${SOURCE_IMAGE}
|
||||
|
||||
# Monkey
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey-clever' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/index.html' '/root/monkey-static/'
|
||||
|
||||
# Butterfly
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.service' '/root/'
|
||||
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/butterfly.socket' '/root/static'
|
||||
|
||||
@@ -79,6 +79,7 @@ python-wstool=0.1.17-1 \
|
||||
python-rosinstall=0.7.8-1 \
|
||||
build-essential=12.3 \
|
||||
libffi-dev \
|
||||
monkey=1.6.9-1 \
|
||||
> /dev/null \
|
||||
&& echo_stamp "Everything was installed!" "SUCCESS" \
|
||||
|| (echo_stamp "Some packages wasn't installed!" "ERROR"; exit 1)
|
||||
@@ -94,6 +95,9 @@ ln -s /root/butterfly.service /lib/systemd/system/
|
||||
ln -s /root/butterfly.socket /lib/systemd/system/
|
||||
systemctl enable butterfly.socket
|
||||
|
||||
echo_stamp "Setup Monkey"
|
||||
ln -s /root/monkey-clever /etc/monkey/sites/clever
|
||||
|
||||
echo_stamp "Add .vimrc"
|
||||
cat << EOF > /home/pi/.vimrc
|
||||
set mouse-=a
|
||||
|
||||
Reference in New Issue
Block a user