[Unit]
Description=Logitech Media Server
After=network.target

[Service]
Type=simple
User=<%= @user_name %>
Group=<%= @user_name %>
ExecStart=<% if @custom_perl != '' %><%= @custom_perl %> <% end -%>
<%= @service_bin %>\
 --cachedir=<%= @data_dir %>\
 --prefsdir=<%= @pref_dir %>\
 --logdir=<%= @log_dir %>\
 --charset=<%= @service_charset %>\
 <%= @service_options %>
RestartSec=5
Restart=on-failure

[Install]
WantedBy=multi-user.target

[Unit]
Description=Logitech Media Server
After=network.target

[Service]
Type=simple
User=<%= @user_name %>
Group=<%= @user_name %>
Environment=LANG=en_US.utf8
ExecStart=<% if @custom_perl != '' %><%= @custom_perl %> <% end -%>
<%= @service_bin %>\
 --cachedir=<%= @data_dir %>\
 --prefsdir=<%= @pref_dir %>\
 --logdir=<%= @log_dir %>\
 --charset=<%= @service_charset %>\
 <%= @service_options %>
RestartSec=5
Restart=on-failure

[Install]
WantedBy=multi-user.target

Fix issue with Ubuntu 15.04 and LANG
Fix issue with Ubuntu 15.04 and LANG

perl complains when starting squeezeboxserver from systemd.  Initial
database creation and subsequent COLLATE pieces of SQL messed up.

Adding an explicit LANG=en_US.utf8 setting to the service file fixes.
Not sure why the LANG="en_US.UTF-8" in /etc/default/locale not working.
Doesn't cause a problem on CentOS 7, so leaving it in for now.

TODO: make the actual locale set be an option.
