Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Moode as a daemon or package instead of OS
#11
Quick and dirty, it works. Might need some tweaks here and there.

start with stock rasbian


Code:
wget http://moodeaudio.org/downloads/prod/moode-r671.zip

unzip -o -q ./moode-r671.zip

sudo apt-get -y install rpi-update php-fpm nginx sqlite3 php-sqlite3 php7.3-gd mpc mpd\
    bs2b-ladspa libbs2b0 libasound2-plugin-equal telnet automake sysstat squashfs-tools shellinabox samba smbclient ntfs-3g \
    exfat-fuse git inotify-tools ffmpeg avahi-utils ninja-build python3-setuptools libmediainfo0v5 libmms0 libtinyxml2-6a \
    libzen0v5 libmediainfo-dev libzen-dev winbind libnss-winbind djmount haveged python3-pip xfsprogs triggerhappy zip id3v2

sudo apt-get -y install bluez-firmware pi-bluetooth \
dh-autoreconf expect libdbus-1-dev libortp-dev libbluetooth-dev libasound2-dev \
libusb-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev libsbc1 libsbc-dev

sudo apt-get -y install libyajl-dev libasound2-dev libavahi-client-dev libavcodec-dev libavformat-dev libbz2-dev libcdio-paranoia-dev \
libcurl4 gnutls-dev libfaad-dev libflac-dev libglib2.0-dev libicu-dev libid3tag0-dev libiso9660-dev libmad0-dev libmpdclient-dev \
libmpg123-dev libmp3lame-dev libshout3-dev libsoxr-dev libsystemd-dev libvorbis-dev libwavpack-dev libwrap0-dev libzzip-dev

# Dirs
sudo mkdir /var/local/www
sudo mkdir /var/local/www/commandw
sudo mkdir /var/local/www/imagesw
sudo mkdir /var/local/www/imagesw/toggle
sudo mkdir /var/local/www/db
sudo mkdir /var/local/php
sudo chmod -R 0755 /var/local/www
sudo mkdir /var/lib/mpd/music/RADIO
# Mount points
sudo mkdir /mnt/NAS
sudo mkdir /mnt/SDCARD
sudo mkdir /mnt/UPNP
# Symlinks
sudo ln -s /mnt/NAS /var/lib/mpd/music/NAS
sudo ln -s /mnt/SDCARD /var/lib/mpd/music/SDCARD
sudo ln -s /media /var/lib/mpd/music/USB
# Logs
sudo touch /var/log/moode.log
sudo chmod 0666 /var/log/moode.log
sudo touch /var/log/php_errors.log
sudo chmod 0666 /var/log/php_errors.log
# Files
sudo cp ./moode/mpd/sticker.sql /var/lib/mpd
sudo cp -r "./moode/other/sdcard/Stereo Test/" /var/lib/mpd/music/SDCARD/

#sudo cp ./moode/var/local/www/db/moode-sqlite3.db.default /var/local/www/db/moode-sqlite3.db

sudo sqlite3 /var/local/www/db/moode-sqlite3.db < ./moode/var/local/www/db/moode-sqlite3.db.sql

# Permissions
sudo chmod 0777 /var/lib/mpd/music/RADIO
sudo chmod -R 0777 /var/local/www/db
sudo chown www-data:www-data /var/local/php

sudo cp ./moode/mpd/RADIO/* /var/lib/mpd/music/RADIO
sudo cp ./moode/mpd/playlists/* /var/lib/mpd/playlists
sudo cp -r ./moode/etc/* /etc
sudo cp -r ./moode/home/* /home/pi
sudo mv /home/pi/dircolors /home/pi/.dircolors
sudo mv /home/pi/xinitrc.default /home/pi/.xinitrc
sudo cp -r ./moode/lib/* /lib
sudo cp -r ./moode/usr/* /usr
sudo cp -r ./moode/var/* /var
sudo cp -r ./moode/www/* /var/www

sudo chmod 0755 /var/www/command/*

sudo sqlite3 /var/local/www/db/moode-sqlite3.db "CREATE TRIGGER ro_columns BEFORE UPDATE OF param, value, [action] ON cfg_hash FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'read only'); END;"
sudo sqlite3 /var/local/www/db/moode-sqlite3.db "update cfg_system set value='Emerald' where param='accent_color'"

sudo touch /var/local/www/libcache.json
sudo chmod 0777 /var/local/www/libcache.json

sudo amixer -D alsaequal > /dev/null

sudo chmod 0755 /usr/local/bin/alsaequal.bin
sudo chown mpd:audio /usr/local/bin/alsaequal.bin

sudo -i
echo -e 'www-data\tALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

sudo cp ./moode/other/mpd/mpd-0.21.24 /usr/local/bin/mpd

sudo chmod 755 /usr/local/bin/moodeutl
sudo chmod 755 /var/local/www/db/moode-sqlite3.db

edit rc.local to comment udisks-glue line

reboot
Reply


Messages In This Thread
RE: Moode as a daemon or package instead of OS - by mtnbrit - 12-08-2020, 06:49 AM

Forum Jump: