How to start up a custom script by calling it in the final desktop command?


I am attempting to start up a custom script by calling it in the final desktop command. It doesn’t seem to launch. Is there a log file I can refer to somewhere that might show the error or the verbose of the custom command?

Learn more, read the entire thread inside the IGEL Community o Slack

Hello @member you may be able to create a the script as a file, and put on a test device in /wfs. Then you could execute it locally to see how it runs.

One gotcha with custom commands, is they all run as the “root” user, so if you are trying to do something in “user land” you may not be running in the correct context.

If that is the case, you would want to create a custom application, and put your script in a permanent location (i.e. /wfs/) and then call the script with the custom application.


Thats exactly how i did it. File in /wfs, verified it runs locally, now i’m trying to run it by putting in the final desktop command /wfs/scriptname.sh. An auto-starting custom application might work better. I am trying to avoid using the custom commands as much as possible because when you have multiple custom commands they get difficult to manage.


What are you trying to do with the script? It may need to be run as user and not root. If it is, you would need to use a “Custom Application” to launch the script, and not a “Custom Command”.


Basically it’s a reboot script. It checks every few seconds the uptime, if it’s longer than a month it passes to another loop that will trigger a reboot after the device is idle for an hour or longer.

Making it a custom application might have worked… Maybe i’ll lower the threshold of uptime to 5 minutes instead of a month to test lol


I think there is a limit on how long we will run a custom command as well, as they can hold up the boot process. So it may get killed and that may be your issue


hmm

Well i think its working in as a custom application that autostarts. if I do “ps -ef” to show running processes, it shows bash and the sleep line of the script.


Yep, custom app should be more stable, and you can set it to auto restart in case it does crash


Cool, thanks 🙂 I’ll verify tomorrow that it actually works and reboots the idle device 😄 This will make doing firmware updates way easier and more automated pairing it with the update on boot setting 🙂

Continue reading and comment on the thread ‘How to start up a custom script by calling it in the final desktop command?’.  Not a member? Join Here!

Learn more, search the IGEL Knowledge Base



Ask a question or comment on the above message thread?

Join or log in to the IGEL Community to ask us anything and meet other IGEL customers, partners, and EUC enthusiasts.

Submit a question, or Join Today!


Popular Message Threads


Categories & Tags: