image: Change monkey startup

This commit is contained in:
Artem Smirnov
2018-10-12 19:11:36 +03:00
parent 280a0003ed
commit 76347bf4cc
5 changed files with 13 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Monkey web-server
[Service]
ExecStart=/usr/sbin/monkey
Restart=on-abort
[Install]
WantedBy=multi-user.target

View File

@@ -87,6 +87,7 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/index.h
# 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/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey.service' '/root/'
# software install
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-software.sh'
# network setup

View File

@@ -119,7 +119,9 @@ systemctl enable butterfly.socket
echo_stamp "Setup Monkey"
mv /etc/monkey/sites/default /etc/monkey/sites/default.orig
ln -s /root/monkey-clever /etc/monkey/sites/default
mv /root/monkey-clever /etc/monkey/sites/default
ln -s /root/monkey.socket /lib/systemd/system/
systemctl enable monkey.socket
echo_stamp "Add .vimrc"
cat << EOF > /home/pi/.vimrc