SOTI MobiControl Linux Shell Commands as a Package

SOTI MobiControl Linux Shell Commands as a Package

Hello

we are trying to manage Linux devices with SOTI MobiControl.

We are able to send shell-commands to the device with Send Scripts. Is it also possible to deploy shell-commands as a package (not only the supported linux script-commands)?

Thanks in Advance.

17 Answers

Order By:   Standard | Newest | Votes
Matt Dermody | posted this 26 November 2019

I have very limited experience managing linux devices in MobiControl, but borrowing from experience with Android I know you can bundle scripts as pre-install or post-install scripts in otherwise empty packages. Perhaps that would work for your purposes as well?

  • 0
  • 0
Sascha Möller | posted this 26 November 2019

Hi Matt,

yes, we tried to deploy shell-commands in pre- and post-scripts in a package, but it doesnt work. We are only able to use scripts-commands from the supported list (https://www.soti.net/mc/help/v14.4/en/scriptcmds/reference/linux.html), but we want to deploy shell-comannds with a package (e.g. to set up a wifi-configuration).

  • 0
  • 0
John Doe | posted this 26 November 2019

Copy your Shell Script and then open or execute the file with:

 

Kind Regards John

  • 0
  • 0
Sascha Möller | posted this 26 November 2019

Hi John,

are you able to execute shell-commands with this script-command in a package?

I tried this script-command (PostInstall: shell test.sh), but it doesnt work for us.

We get the following error: sh: 1: ./sendScript.sh: Exec format error

 

  • 0
  • 0
John Doe | posted this 27 November 2019

https://www.cyberciti.biz/faq/run-execute-sh-shell-script/

Kind Regards John

  • 0
  • 0
John Doe | posted this 27 November 2019

Check if you can run your script manualy from the device.

Have you made the script executable with chmod before?

Kind Regards John

  • 0
  • 0
Sascha Möller | posted this 27 November 2019

Hi John,

yes, i can run the shell-script manually and can send a script (shell bash /home/test.sh) with soti to run the shell-script, but it doenst work with a package...:(

 

  • 0
  • 0
Durgesh, Singh | posted this 28 November 2019

Hi Sascha,

With Send script or post package install script. You can use normal shell command to execute .sh file. 

If it is a normal sh, please use the sh command. Ex.       sh /tmp/USBScript.sh

in case it is Bash shell  you can use bash , Ex.   bash /home/sample/f4.sh

Instead of writing the scripts in shell file, you can write the shell scripts with all logic in Send script or pre/post install script panel with package and File Sync.

  • 1
  • 1
John Doe | posted this 28 November 2019

Thats nice to now, thanks for sharing.

I thought you could only leverage the commands mentioned in the documentation and for more we´d use script files that were run through preinstall.

 

 

Kind Regards John

  • 0
  • 0
Sascha Möller | posted this 28 November 2019

Hello Singh,

pre- and post-scripts in a package don't work for us.

If we use a pre-install script, we get the following error message:

If we use a post-install script, it will not run. SOTI-scripts-commands will not run, too (e.g. reset /s).

Which Package Studio do you use? We are using SOTI MobiControl 14.4.2.1307 and our Package Studio has no option for Linux.

https://discussions.soti.net/thread/send-package-for-raspberry-pi-with-mobicontrol-package-estudio/

 

Regards, Sascha

  • 0
  • 0
Durgesh, Singh | posted this 29 November 2019

While creating package , please select ALL in platform for creating package for Linux platform. Could you share the script or sample script which you are trying to run as pre or post install script with package.

  • 0
  • 0
Sascha Möller | posted this 02 December 2019

Hello Durgesh,

i created the packages with two different versions of mobicontrol:

Package Studio 14.4.2 Build 308
Platform ALL
Processor ALL

Package Studio 14.2.0 Build 351
Platform Linux
Processor ALL

We use this sample-script for testing: reset /s

Regards, Sascha

  • 0
  • 0
Durgesh, Singh | posted this 09 December 2019

I have tried to run reset /s on raspberry pi (Raspbian 9 OS), it is giving me unknown terminal type of error.

Could you try to build package with simple shell scripts such as mkdir /home/SOTIinstallscriptTest/

Once you are successful, you can try to build complex shell scripts and run it via package.

  • 0
  • 0
Sascha Möller | posted this 09 December 2019

Hi Durgesh,

we are using Debian GNU/Linux 9.

 


Package Studio 14.4.2 Build 308
Platform ALL
Processor ALL

Test 1: PreInstall-Script (mkdir /home/SOTIinstallscriptTest/)

Error: Profile "Package" version 1 failed to install, because all of its payloads cannot be installed.

Error: Package "Test" version 1.0 failed to install. Package file not found  

Test 2: PostInstall-Script (mkdir /home/SOTIinstallscriptTest/)

Profile is installed, but the script was not executed (directory was not created).


Package Studio 14.2.0 Build 351
Platform Linux
Processor ALL

Test 1: PreInstall-Script (mkdir /home/SOTIinstallscriptTest/)

Error: Profile "Package" version 3 failed to install, because all of its payloads cannot be installed. Error: Package "Test" version 3.0 failed to install. Package file not found

 

Test 2: PostInstall-Script (mkdir /home/SOTIinstallscriptTest/)

Profile is installed, but the script was not executed (directory was not created).


 

Regards,

Sascha

 

  • 0
  • 0
Sven Bielinski | posted this 12 December 2019

Hi Durgesh, Could you please assist on this.

 

Thank you,

  • 0
  • 0
Durgesh, Singh | posted this 12 December 2019

Hi Shasha,

Could you tell me the processor name as well.

 

  • 0
  • 0
Sascha Möller | posted this 12 December 2019

Hi Durgesh,

we are using DLOG DLT-V7210 R:

  • Linux X86 (32 Bit)
  • Intel Atom E3845 Quad Core 1.91 GHz 4GB RAM

Regards,

Sascha

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback