SquishBox setup notes

Categories: Development

setting up in debian buster

  • write image, save ssh, wpa_supplicant.conf to /boot
  • sudo apt-get update/upgrade
  • sudo apt-get install fluidsynth
  • build newest fluid: get source; edit /etc/apt/sources.list uncomment deb-src line; sudo apt-get build-dep fluidsynth --no-install-recommends; mkdir build; cmake ..; make
  • install nginx – (https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md) – lots of stuff
    sudo apt-get install nginx; sudo apt-get install php-fpm; edit /etc/nginx/sites-enabled/default
    allow large files to upload: add to http context in /etc/nginx/nginx.conf: client_max_body_size 900M;<br>in /etc/php/7.0/fpm/php.ini:
    memory_limit = 32M?<br>upload_max_filesize = 900M<br>post_max_size = 999M
  • sudo apt-get install python3-pip
  • sudo apt-get autoremove
  • sudo apt-get clean
  • sudo pip3 install oyaml RPi.GPIO RPLCD mido
  • install dac: add dtoverlay=hifiberry-dac and #dtparam=audio=on to /boot/config.txt
  • upload squishbox code
  • chmod a+x squishbox.py
  • realtime audio:
    sudo usermod -a -G audio pi
    sudo vi /etc/security/limits.d/audio.conf:
    @audio - rtprio 80<br>@audio - memlock unlimited
  • web panel stuff tinyfilemanager
  • add www-data to pi group and chmod -R g+rw /home/pi
  • edit /lib/systemd/system/php7.3-fpm.service – umask 0002 to [Service]
  • create systemd service
    www.reddit.com/r/raspberry_pi/comments/4vhofs/creating_a_systemd_daemon_so_you_can_run_a_python/
    create /etc/systemd/system/squishbox.service:
    [Unit]<br>Description=SquishBox<br>After=multi-user.target [Service]<br>Type=simple<br>ExecStart=/home/pi/squishbox.py<br>User=root<br>WorkingDirectory=/home/pi<br>Restart=on-failure [Install]<br>WantedBy=multi-user.target<br>sudo systemctl enable squishbox.service<br>sudo systemctl daemon-reload<br>sudo systemctl start squishbox.service
«
»

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.