Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 19172

How do I run a script on startup on Edison?

$
0
0

I have two things I need to do on power up.  One is to set up Bluetooth.  The other is to launch my program.  This is a headless machine and it just runs its task continuously until the power is removed.

 

I thought that /etc/rc.local if set executable would execute. Much of the documentation I find does not work as many normal commands are not on Edison.

 

This is the rc.local script I tried:

 

 

#!/bin/bash

/usr/bin/rfkill unblock bluetooth

 

I set permissions to 755

 

The reason I thought this would work is this file in /lib/systemd/system/rc-local.service

 

# systemd-rc-local-generator if /etc/rc.local is executable.

[Unit]

Description=/etc/rc.local Compatibility

ConditionFileIsExecutable=/etc/rc.local

After=network.target

 

 

[Service]

Type=forking

ExecStart=/etc/rc.local start

TimeoutSec=0

RemainAfterExit=yes

SysVStartPriority=99

 

 

I have no idea regarding the second task of starting a program that never exits.


Viewing all articles
Browse latest Browse all 19172

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>