1

As the title saying, I want to start on this.

sudo service (my service name) start.

Where do I write this script that can make service initially start? My service is "apache2" and "bluetooth". Otherwise, I currently have a problem on bluetooth keyboard can't get automatically connected after reboot or a wake-up.

jefferyear
  • 193
  • 1
  • 3
  • 9

1 Answers1

0

This is the way I used to schedule on reboot to start my custom monitoring scripts.

Say I have written a whatsapp service that will trigger messages to my whatsapp number when ever I have asked my Raspberry to monitor some activities at home. There are better ways to doing when it comes to services like apache/mongod etc.

cron way of doing -

  1. sudo crontab -e (select the editor of your choice like nano/vi etc. This will be a one time option asked by Pi.)
  2. @reboot service apache2 restart

Hope this helps.

Varad A G
  • 850
  • 6
  • 18