classic-snap icon indicating copy to clipboard operation
classic-snap copied to clipboard

Launch services on startup

Open balinabbb opened this issue 6 years ago • 2 comments

Hello there!

I am working on a project, where I have a Raspberry Pi 3 with Ubuntu Core, configured as a hotspot with the wifi-ap snap. With the classic-snap, I installed nginx and supervisor to manage my webserver and django backend. I did try to launch them manually, and everything works fine.

However I can not seem to find a way to start them automatically when the raspberry boots. Previously when I went with raspbian, I simply put a supervisord -c supervisor.conf to my /etc/rc.local, and nginx was running automatically.

  • What I understand is that I can not modify the /etc/rc.local in the readonly snappy system.
  • I can also only access nginx and supervisor in the classic dimension.

I used update-rc.d and based on the skeleton in /etc/init.d/skeleton I created a launch script which should run code like:

#!/bin/bash

classic
nginx -s reload
supervisor -c supervisor.conf

After a reboot when I use ps -ef to check my processes I can see that classic is mounted and running, but neither nginx nor supervisor is. I can't seem to run any code after I issue the command classic in a startup script.

Could you please help me with a solution to launch these services when the devices boots?

balinabbb avatar Mar 19 '18 11:03 balinabbb