forked from LMS-Community/slimserver-platforms
-
Notifications
You must be signed in to change notification settings - Fork 0
JohanSaaw/slimserver-platforms
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Please read the following man pages for in depth information on how
the systemd unit files work.
systemd.unit
systemd.service
********************************************************************************
* Stop/Start/Check status of Lyrion Music Server
********************************************************************************
sudo systemctl start lyrionmusicserver
sudo systemctl stop lyrionmusicserver
systemctl status lyrionmusicserver
sudo systemctl restart lyrionmusicserver
********************************************************************************
* To see the content of the systemd unit file
********************************************************************************
systemctl cat lyrionmusicserver
********************************************************************************
* Adapting the Lyrion Music Configuration
********************************************************************************
To tweak, extend or change the Lyrion Music Server it is necessary to use drop
in files for systemd. The drop in files for Lyrion Music Server must be created
in:
/etc/systemd/system/lyrionmusicserver.service.d
You will have to create the directory yourself. The drop in file can be called
anything, but it needs the string ".conf" at the end of the name, e.g.
lyrion_changed_config.conf
You can create one or more drop in files in that directory. You can have one or
more changes to the configuration in the files. Remember that the files are read
in lexicographic order so that the files read last overrides the files read
earlier if they have overlapping configuration statements.
NOTE: NEVER MAKE ANY CHANGES TO THE UNIT FILE DELIVERED BY RPM PACKAGE IN THE
LOCATION /usr/lib/systemd/system/lyrionmusicserver.service. ANY CHANGES IN
THIS FILE WILL BE OVERWRITTEN NEXT TIME THE LYRION MUSIC SERVER IS
UPGRADED.
The default systemd unit file comes with a working configuration. Only change
it, if you know what you are doing.
In the default unit file the following 5 environment variables are defined.
Environment="LYRION_CFG_DIR=/var/lib/lyrionmusicserver/prefs"
Environment="LYRION_LOG_DIR=/var/log/lyrionmusicserver"
Environment="LYRION_CACHE_DIR=/var/lib/lyrionmusicserver/cache"
Environment="LYRION_CHARSET=utf8"
Environment="LYRION_ADDITIONAL_ARGS="
These environment variables are used further down in the unit file in the start
command.
You can change the Lyrion start-up command by changing the value of the four
first variables here above and add any other command line parameter to the start
command by using the variable LYRION_ADDITIONAL_ARGS by adding one or
more drop in files in /etc/systemd/system/lyrionmusicserver.service.d as
described here above.
You can also change the user id and group id used to run the server with
drop in files. There is an example here below.
********************************************************************************
*
* EXAMPLES
*
********************************************************************************
********************************************************************************
* How to change the log directory location
********************************************************************************
Create a file in /etc/systemd/system/lyrionmusicserver.service.d, you can call
the file whatever you like, but the name must end with ".conf".
The content of the file should be (without the dashed lines)
-----------------------------------------------
[Service]
Environment="LYRION_LOG_DIR=/your/preferred/location"
-----------------------------------------------
After you created the file you must tell the systemd to pick up the changes.
Execute:
sudo systemctl daemon-reload
Then restart Lyrion Music Server so that it picks up the new configuration.
NOTE: Make sure that you create the new diretory before you restart the service.
********************************************************************************
* Passing extra arguments to the Lyrion Music server
********************************************************************************
If you want to pass extra variables to Lyrion Music Server at startup, then add
them to the variable LYRION_ADDITIONAL_ARGS. To do this create a drop in file in
/etc/systemd/system/lyrionmusicserver.service.d with this content (without the
dashed lines):
------------------------------------------------
[Service]
Environment="LYRION_ADDITIONAL_ARGS=--d_startup"
------------------------------------------------
*** PLEASE NOTE ***
You can't use nested variables in the definition for LYRION_ADDITIONAL_ARGS.
********************************************************************************
* How to change the user id and group used to run Lyrion Music Server
********************************************************************************
Create a file in /etc/systemd/system/lyrionmusicserver.service.d, you can call
the file whatever you like, but the name ust end with ".conf".
The content of the file should be (without the dashed lines)
-----------------------------------------------
[Service]
USER=the-preferred-user-name
GROUP=the-preferred-group-name
-----------------------------------------------
After you created the file you must tell the systemd to pick up the changes.
Execute:
sudo systemctl daemon-reload
NOTE!
Please bear in mind that changing the user and group that runs the Lyrion Music
Server processes is a far reaching change. You will have to ensure that the new
user id and group id have sufficient read and write rights to all the file used
by the Lyrion Music Server.
About
Platform-specific build tools for Lyrion Music Server
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Inno Setup 80.6%
- Perl 7.6%
- HTML 6.6%
- CSS 2.9%
- JavaScript 1.3%
- Shell 0.5%
- Other 0.5%