0

I have a problem. I need to start enigma2 with a script. It works when I start the script from the server directly. When I start the script with SSH from the main server it only says that the command is unknown. It is a specific command for the enigma2-software - init.

Is there a possibility to solve my problem or any other options for this?

Biffen
  • 6,249
  • 6
  • 28
  • 36
  • 2
    `.profile` is only run when you make an interactive login, not when you run a command remotely with `ssh`. if that's where you add the directory to your `PATH`, you need to do this explicitly in your command, or send `source .profile`. – Barmar Mar 06 '18 at 07:45
  • When you call it from the script, give the full path of the `enigma2` executable. – cdarke Mar 06 '18 at 08:02
  • Barmer sry i don't understand yours complete, cdarke thanks it works – Fabian Schäfer Mar 06 '18 at 08:34
  • I wouldn't generally recommend just giving the full path for the executable unless we are sure about what the executable does. The init script can set `PATH`, `LD_LIBRARY_PATH` and other variables. In general, an exe can internally call other exe/script. So, unless we know what it does, I would recommend sourcing the init scripts. – anishsane Mar 06 '18 at 09:12

1 Answers1

1

Most systems run enigma2 through init. A typical oe-alliance distro will use init 4 to stop enigma2 and init 3 to start it.

For development purposes, you would typically stop enigma2 with init 4 and then run it from command line using the wrapper script.

root@devv2:~# init 4
root@devv2:~# /usr/bin/enigma2.sh

I do not recommend running the enigma2 binary directly as the wrapper script sets up a number of things that are quite important for proper operation. It is also responsible for watching the return code from the main binary and if required executing further tasks, such as performing firmware updates, shutting down the machine or entering standby/sleep mode.

peteru
  • 130
  • 1
  • 11