How to set bash script on boot cloud9 instance


#1

I create a new Ubuntu 14 machine in cloud9 service. Then I try to set a bash script to run on boot but the script doesn’t run.

The script has permissions to run as I set it to run on boot by running the following command:

update-rc.d script_name.sh defaults

This is a problem of cloud9 service or I am making something wrong in the configuration?


#2

AFAIK there is no way to set a script to run at boot time, but you can use ide init script, to run a script on vm when connecting to the workspace Init script example


#3

But that way the script will run just for one workspace or for all workspaces?

In my case I only want the script to run in one workspace.


#4

Could one, in theory, setup a cron job for that particular workspace? I haven’t tested it on C9 but works just fine on any other linux machine.