illustrate
Products            Buy            Support Forum            Registrations            Professional            About           
 

Raspberry Pi - Asset Restart

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kgibb01

    • Nov 2017
    • 7

    #1

    Raspberry Pi - Asset Restart

    I have Asset running on A Raspberry Pi 4b (Bookworm)

    I start Asset as suggested from boot using crontab

    reboot /home/pi/bin/AssetUPnP/AssetUPnP

    What is the best method of restarting Asset without rebooting?
    Or can it be run as a service? If so have you got instructions?

    Kevan
  • Spoon
    Administrator
    • Apr 2002
    • 45244

    #2
    If you have it on a reboot crontab, why do you need to restart it?

    There is no such thing as service running on Linux.
    Spoon
    www.dbpoweramp.com

    Comment

    • kgibb01

      • Nov 2017
      • 7

      #3
      Very picky! OK a "systemd" process.

      I have other packages that run on this server and would rather not have to restart them, if Asset fails.

      Anyway why should you reboot all the time, that is for Windows!!!

      Comment

      • tew42

        • Aug 2025
        • 1

        #4
        Since I set up Asset UPnP in a container without crontab, I wrote up a custom .service file that then also confers systemctl start/stop/restart functionality. Not tested for very long, but seems to work.

        Be sure to modify user/group for your system

        Code:
        [Unit]
        Description=Asset UPnP Media Server
        After=syslog.target local-fs.target network.target
        
        [Service]
        Type=simple
        User=<user>
        Group=<group>
        ExecStart=/home/<user>/bin/AssetUPnP/AssetUPnP
        ExecStop=kill $MAINPID
        ExitType=cgroup
        KillMode=control-group
        TimeoutStopSec=30
        Restart=on-abort
        
        [Install]
        WantedBy=multi-user.target

        Comment

        Working...