esteanes / mopidy_multiple-instances Goto Github PK
View Code? Open in Web Editor NEWA guide & script to create multiple instances of Mopidy and integrate it with Snapcast
A guide & script to create multiple instances of Mopidy and integrate it with Snapcast
First issue that came up when running the script:
multiple_mopidy.sh: line 3: test: -eq: unary operator expected
What do you think is wrong? Looks like something wrong with the test function.
Line 28 has an issue
if test $host -ne ""
result:
multiple_mopidy.sh: line 28: test: -ne: unary operator expected
I receive this issue when executing without a 2nd argument (localhost hostname)
bashtest.sh: line 3: test: -eq: unary operator expected
When using Mopidy-Iris to control Modipy then the Iris scripts to start local scan and restart server fails.
A simple solution is to edit the file /usr/local/lib/python3.9/dist-packages/mopidy_iris/system.sh
The restart lines are these two:
RESTART="$(sudo service mopidy restart)"
echo -e "${RESTART}"
Change it to:
RESTART="$(sudo service mopidy_1 restart)"
echo -e "${RESTART}"
RESTART="$(sudo service mopidy_<n> restart)"
echo -e "${RESTART}"
And the start local scan is this lines:
SCAN=$(sudo mopidyctl local scan)
Change that to these:
SCAN=$(sudo mopidyctl_1 local scan)
SCAN=$(sudo mopidyctl_2 local scan)
Without this the start local scan will run on the original mopidy folders and not the extra instances and the restart will start the local mopidy and keep the extra instances running without a restart.
The downside to this quick fix is that there is no specific instance control.
A click on the restart button will restart all the instances and a click on the start local scan button will scan the media folder once for each instance. Especially the local scan might take some time with large media libraries and/or many instances.
When I ran the script this happened:
chown: cannot access '/var/cache/mopidy_4': No such file or directory
Any ideas?
Found this when running the code
Executing Step 4 cat: /etc/mopidy.conf: No such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.