Linux run service on boot - up as soon as possible
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Here is my service:
# This service will run in parallel with other services
# create ... mouselogger.service
# /etc/systemd/system
[Unit]
Description=MojeUre boot init display
[Service]
Type=simple
# RemainAfterExit=yes
ExecStart=/usr/bin/python /home/mojeure/scripts/MojeUreBoot.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
Alias=mojeureboot.service
I want to run it right after I plug-in power into my rasppbery pi.
How should I re-edit this service? Script is in Python, basicaly it outputs some text on LCD screen which is connected to RPI.
Currently have this code in service, but still service starts after network:
[Unit]
Description=MojeUre boot init display
Before=network-pre.target
Wants=network-pre.target
[Service]
Type=simple
# RemainAfterExit=yes
ExecStart=/usr/bin/python /home/mojeure/scripts/MojeUre.py
Restart=on-abort
[Install]
# WantedBy=basic.target
Alias=mojeureboot.service
WantedBy=network.target
enter code here
enter code here
boot systemd raspberry-pi
migrated from serverfault.com Aug 17 at 12:53
This question came from our site for system and network administrators.
add a comment |Â
up vote
0
down vote
favorite
Here is my service:
# This service will run in parallel with other services
# create ... mouselogger.service
# /etc/systemd/system
[Unit]
Description=MojeUre boot init display
[Service]
Type=simple
# RemainAfterExit=yes
ExecStart=/usr/bin/python /home/mojeure/scripts/MojeUreBoot.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
Alias=mojeureboot.service
I want to run it right after I plug-in power into my rasppbery pi.
How should I re-edit this service? Script is in Python, basicaly it outputs some text on LCD screen which is connected to RPI.
Currently have this code in service, but still service starts after network:
[Unit]
Description=MojeUre boot init display
Before=network-pre.target
Wants=network-pre.target
[Service]
Type=simple
# RemainAfterExit=yes
ExecStart=/usr/bin/python /home/mojeure/scripts/MojeUre.py
Restart=on-abort
[Install]
# WantedBy=basic.target
Alias=mojeureboot.service
WantedBy=network.target
enter code here
enter code here
boot systemd raspberry-pi
migrated from serverfault.com Aug 17 at 12:53
This question came from our site for system and network administrators.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Here is my service:
# This service will run in parallel with other services
# create ... mouselogger.service
# /etc/systemd/system
[Unit]
Description=MojeUre boot init display
[Service]
Type=simple
# RemainAfterExit=yes
ExecStart=/usr/bin/python /home/mojeure/scripts/MojeUreBoot.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
Alias=mojeureboot.service
I want to run it right after I plug-in power into my rasppbery pi.
How should I re-edit this service? Script is in Python, basicaly it outputs some text on LCD screen which is connected to RPI.
Currently have this code in service, but still service starts after network:
[Unit]
Description=MojeUre boot init display
Before=network-pre.target
Wants=network-pre.target
[Service]
Type=simple
# RemainAfterExit=yes
ExecStart=/usr/bin/python /home/mojeure/scripts/MojeUre.py
Restart=on-abort
[Install]
# WantedBy=basic.target
Alias=mojeureboot.service
WantedBy=network.target
enter code here
enter code here
boot systemd raspberry-pi
Here is my service:
# This service will run in parallel with other services
# create ... mouselogger.service
# /etc/systemd/system
[Unit]
Description=MojeUre boot init display
[Service]
Type=simple
# RemainAfterExit=yes
ExecStart=/usr/bin/python /home/mojeure/scripts/MojeUreBoot.py
Restart=on-abort
[Install]
WantedBy=multi-user.target
Alias=mojeureboot.service
I want to run it right after I plug-in power into my rasppbery pi.
How should I re-edit this service? Script is in Python, basicaly it outputs some text on LCD screen which is connected to RPI.
Currently have this code in service, but still service starts after network:
[Unit]
Description=MojeUre boot init display
Before=network-pre.target
Wants=network-pre.target
[Service]
Type=simple
# RemainAfterExit=yes
ExecStart=/usr/bin/python /home/mojeure/scripts/MojeUre.py
Restart=on-abort
[Install]
# WantedBy=basic.target
Alias=mojeureboot.service
WantedBy=network.target
enter code here
enter code here
boot systemd raspberry-pi
boot systemd raspberry-pi
edited Aug 21 at 10:31
asked Aug 17 at 12:45
noname
11
11
migrated from serverfault.com Aug 17 at 12:53
This question came from our site for system and network administrators.
migrated from serverfault.com Aug 17 at 12:53
This question came from our site for system and network administrators.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
It depends on what your script need to work propertly
you have banch of targets to use in WantedBy
directive. I'd use basic.target
, or network.target
(if you need data from network to be displayed)
Currently it tooks 25sec to run this service from boot, any chance to speed up boot service at startup?
â noname
Aug 20 at 9:58
try to run systemd-analyze plot > bootchart.svg and look what is starting so slow and is it possible to disable/change dependencies of smth
â Alexander
Aug 20 at 10:08
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
It depends on what your script need to work propertly
you have banch of targets to use in WantedBy
directive. I'd use basic.target
, or network.target
(if you need data from network to be displayed)
Currently it tooks 25sec to run this service from boot, any chance to speed up boot service at startup?
â noname
Aug 20 at 9:58
try to run systemd-analyze plot > bootchart.svg and look what is starting so slow and is it possible to disable/change dependencies of smth
â Alexander
Aug 20 at 10:08
add a comment |Â
up vote
0
down vote
It depends on what your script need to work propertly
you have banch of targets to use in WantedBy
directive. I'd use basic.target
, or network.target
(if you need data from network to be displayed)
Currently it tooks 25sec to run this service from boot, any chance to speed up boot service at startup?
â noname
Aug 20 at 9:58
try to run systemd-analyze plot > bootchart.svg and look what is starting so slow and is it possible to disable/change dependencies of smth
â Alexander
Aug 20 at 10:08
add a comment |Â
up vote
0
down vote
up vote
0
down vote
It depends on what your script need to work propertly
you have banch of targets to use in WantedBy
directive. I'd use basic.target
, or network.target
(if you need data from network to be displayed)
It depends on what your script need to work propertly
you have banch of targets to use in WantedBy
directive. I'd use basic.target
, or network.target
(if you need data from network to be displayed)
answered Aug 17 at 13:34
Alexander
72013
72013
Currently it tooks 25sec to run this service from boot, any chance to speed up boot service at startup?
â noname
Aug 20 at 9:58
try to run systemd-analyze plot > bootchart.svg and look what is starting so slow and is it possible to disable/change dependencies of smth
â Alexander
Aug 20 at 10:08
add a comment |Â
Currently it tooks 25sec to run this service from boot, any chance to speed up boot service at startup?
â noname
Aug 20 at 9:58
try to run systemd-analyze plot > bootchart.svg and look what is starting so slow and is it possible to disable/change dependencies of smth
â Alexander
Aug 20 at 10:08
Currently it tooks 25sec to run this service from boot, any chance to speed up boot service at startup?
â noname
Aug 20 at 9:58
Currently it tooks 25sec to run this service from boot, any chance to speed up boot service at startup?
â noname
Aug 20 at 9:58
try to run systemd-analyze plot > bootchart.svg and look what is starting so slow and is it possible to disable/change dependencies of smth
â Alexander
Aug 20 at 10:08
try to run systemd-analyze plot > bootchart.svg and look what is starting so slow and is it possible to disable/change dependencies of smth
â Alexander
Aug 20 at 10:08
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463181%2flinux-run-service-on-boot-up-as-soon-as-possible%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password