ian_heys wrote: 
> Thanks for the pointers. I now have it working.
> 
> 1. Place binary in /usr/bin
> 2. Create sq2upnp.service file and place in /usr/lib/systemd/system
> 3. Start service with systemctl enable sq2upnp.service
> 4. Reboot
> 
> Here is sq2upnp.service file:
> 
> [Unit]
> Description=Squeeze2upnp
> After=multi-user.target
> 
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> ExecStart=/usr/bin/squeeze2upnp-armv6hf-static
> ExecStop=/usr/bin/squeeze2upnp-armv6hf-static
> 
> [Install]
> WantedBy=multi-user.target
> 
> I now need to tone down the file permissions to finalise it all.
> 
> Thanks again for your help.

I came across a good example of doing this sort of thing at
unix.stackexchange.com:


http://unix.stackexchange.com/questions/47695/how-to-write-startup-script-for-systemd


It's obvious when you see it, but for trivial case simply put the
command in the unit file itself.


------------------------------------------------------------------------
Krisbee's Profile: http://forums.slimdevices.com/member.php?userid=59080
View this thread: http://forums.slimdevices.com/showthread.php?t=101624

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to