12-03-2023, 12:45 AM
You might try this.
1. Delete the sxm-player startup line from /etc/rc.local
2. Use your favorite editor to create a file named sxm-player.service in the default user's (user pi in following example) home directory on the moOde player. The content of this file should be (note that this content is case sensitive)
There is no trailing '&' in the start command.
3. As superuser, copy this file to /etc/systemd/system/sxm-player.service
4. Check the resulting file has ownership and permissions as shown here
5. Make systemd aware of this service and then enable it
You should see a response like the following
6.Now reboot the moOde player
7. Check the status of the service
If all went well, you'll see something like
If not, you can post the output.
Notes:
1. the actual filename is arbitrary but its extension *must* be .service
2. one can simply create and edit the file in the target directory as superuser
3. I no longer have a valid SXM subscription so I can't test that the result is satisfactory. That's up to you. Good luck.
Regards,
Kent
1. Delete the sxm-player startup line from /etc/rc.local
2. Use your favorite editor to create a file named sxm-player.service in the default user's (user pi in following example) home directory on the moOde player. The content of this file should be (note that this content is case sensitive)
Code:
[Unit]
Description=sxm-player
After=network-online.target
Requires=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/sxm-player -U your-SXM-username -P your-SXM-password
[Install]
WantedBy=multi-user.target
There is no trailing '&' in the start command.
3. As superuser, copy this file to /etc/systemd/system/sxm-player.service
Code:
sudo cp sxm-player.service /etc/systemd/system/sxm-player.service
4. Check the resulting file has ownership and permissions as shown here
Code:
pi@moode:~ $ ls -l /etc/systemd/system/sxm-player.service
-rw-r--r-- 1 root root 208 Dec 2 18:42 /etc/systemd/system/sxm-player.service
5. Make systemd aware of this service and then enable it
Code:
sudo systemctl daemon-reload
sudo systemctl enable sxm-player
You should see a response like the following
Code:
pi@moode:~ $ sudo systemctl daemon-reload
pi@moode:~ $ sudo systemctl enable sxm-player
Created symlink /etc/systemd/system/multi-user.target.wants/sxm-player.service → /etc/systemd/system/sxm-player.service.
6.Now reboot the moOde player
7. Check the status of the service
Code:
systemctl status sxm-player
If all went well, you'll see something like
Code:
pi@moode:~ $ systemctl status sxm-player
● sxm-player.service - sxm-player
Loaded: loaded (/etc/systemd/system/sxm-player.service; enabled; vendor preset: enabled)
Active: active (running) since ...
If not, you can post the output.
Notes:
1. the actual filename is arbitrary but its extension *must* be .service
2. one can simply create and edit the file in the target directory as superuser
3. I no longer have a valid SXM subscription so I can't test that the result is satisfactory. That's up to you. Good luck.
Regards,
Kent