Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jan 2022
    Posts
    15

    My usecase - need guidance

    Hello,

    I need some help with my usecase.
    I made a player which is working well (at start it connects to LMS and play, so it's ok).
    Now I would like to achieve this :
    - my player is designed to be mobile so at boot it should check if it is on a specific wifi network (home). If it is at home, then it should start as a player connected to home LMS.
    - if it can't find home network, it should connect to whatever network it knows and launch a player and LMS server in order to be autonomous.

    What I did so far :
    - managed multiple SSID (I had issue with wpa_passphrase and priority but that's not my priority). So my player can connect to multiple wifi networks.
    - wrote a script that checks if it is connected on a specific network (my home) and if the LMS server is running.
    - connect to this LMS in case it find it.

    I would appreciate help for the part where I need to launch a LMS server....

    I had a look to pcp_startup.sh but didn't find a way to achieve my goal due to poor bash knowledge (part called "Start LMS")

    If anyone can help me, I would be grateful.
    Last edited by Wiking; 2022-02-01 at 13:09.

  2. #2
    Junior Member
    Join Date
    Jan 2022
    Posts
    15
    If a put that in my script
    sudo /usr/local/etc/init.d/slimserver start

    is it enough ?

  3. #3
    Junior Member
    Join Date
    Jan 2022
    Posts
    15
    Quote Originally Posted by Wiking View Post
    If a put that in my script
    sudo /usr/local/etc/init.d/slimserver start

    is it enough ?
    Solved.

    sudo -u tc tce-load -i slimserver
    sudo /usr/local/etc/init.d/slimserver start


    did the job.
    I don't know why but priority and passphrase are also working.
    So everything is solved !

    may be sudo -u tc is senseless.....

  4. #4
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,900
    tce-load must run with non-root rights. So if your main script is running with root permissions, then you script is correct.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #5
    Junior Member
    Join Date
    Jan 2022
    Posts
    15
    Quote Originally Posted by paul- View Post
    tce-load must run with non-root rights. So if your main script is running with root permissions, then you script is correct.
    So it's ok. My script is launched by one of the three "user command". I have read that they are run with root.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •