I'm working on a project to build a web server based on flask on intel Edison. I'm wondering if it possible that the flask will run automatically when the edison connects to wifi. That means I want the original home page on intel edison is replaced by my web page.
Thank you guys in advanced.
Link Copied
**EDIT ** Added an example unit file.
To permanently stop the existing Edison web page from starting at boot:
1. Log onto your edison using SSH or a serial terminal.
2. Enter the following command:
systemctl disable edison_config.service
systemctl stop edison_config.service
Then create a 'unit' file with all the instructions necessary to start your Flask web server. Lets say you call the unit file "my_web.service" then you would save it in /lib/systemd/system and then run these commands:
systemctl enable my_web.service
systemctl start my_web.service
Now your Flask server will start every time edison boots.
For details on writing a "unit" file see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_... here.
As an example, here is the unit file that I use to start my can-processor on my Edison:
[Unit]
Description=Daemon to handle mercury CAN Bus Interface.
After=network.target
[Service]
Type=idle
ExecStart=/usr/local/bin/spider_can
Restart=on-failure
[Install]
WantedBy=multi-user.target
**EDIT ** Added an example unit file.
To permanently stop the existing Edison web page from starting at boot:
1. Log onto your edison using SSH or a serial terminal.
2. Enter the following command:
systemctl disable edison_config.service
systemctl stop edison_config.service
Then create a 'unit' file with all the instructions necessary to start your Flask web server. Lets say you call the unit file "my_web.service" then you would save it in /lib/systemd/system and then run these commands:
systemctl enable my_web.service
systemctl start my_web.service
Now your Flask server will start every time edison boots.
For details on writing a "unit" file see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_... here.
As an example, here is the unit file that I use to start my can-processor on my Edison:
[Unit]
Description=Daemon to handle mercury CAN Bus Interface.
After=network.target
[Service]
Type=idle
ExecStart=/usr/local/bin/spider_can
Restart=on-failure
[Install]
WantedBy=multi-user.target
Hi Mozzie,
Do you still need assistance with this case?
-Sergio A
Sorry for the delay. Temporary not. Thank you very much.
You're welcome! Don't hesitate to contact us again if help is needed. We'd be happy to help.
Regards,
-Sergio A
For more complete information about compiler optimizations, see our Optimization Notice.