How to make a binary start itself after it's first run? [closed]
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to automatically create some sort of "service" that does only very basic things (start a binary on system start) and it's supposed to work on most Linux distributions out there.
I want to create the service as easy as possible, ideally the binary should be able to do it itself on it's first start.
linux services
closed as too broad by Rui F Ribeiro, Kusalananda♦, Jeff Schaller♦, Fabby, Thomas Mar 9 at 9:53
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I want to automatically create some sort of "service" that does only very basic things (start a binary on system start) and it's supposed to work on most Linux distributions out there.
I want to create the service as easy as possible, ideally the binary should be able to do it itself on it's first start.
linux services
closed as too broad by Rui F Ribeiro, Kusalananda♦, Jeff Schaller♦, Fabby, Thomas Mar 9 at 9:53
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
2
If your version of Linux supports systemd, use a systemd service with Restart set to always.
– Raman Sailopal
Mar 8 at 13:52
1
Use systemd service unit and Read the systemd man page.
– 炸鱼薯条德里克
Mar 8 at 14:12
1
You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.
– Michael D.
Mar 8 at 14:16
1
There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburgrc
. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.
– JdeBP
Mar 8 at 16:48
add a comment |
I want to automatically create some sort of "service" that does only very basic things (start a binary on system start) and it's supposed to work on most Linux distributions out there.
I want to create the service as easy as possible, ideally the binary should be able to do it itself on it's first start.
linux services
I want to automatically create some sort of "service" that does only very basic things (start a binary on system start) and it's supposed to work on most Linux distributions out there.
I want to create the service as easy as possible, ideally the binary should be able to do it itself on it's first start.
linux services
linux services
edited Mar 11 at 10:16
Michael Niemand
asked Mar 8 at 12:32
Michael NiemandMichael Niemand
173117
173117
closed as too broad by Rui F Ribeiro, Kusalananda♦, Jeff Schaller♦, Fabby, Thomas Mar 9 at 9:53
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as too broad by Rui F Ribeiro, Kusalananda♦, Jeff Schaller♦, Fabby, Thomas Mar 9 at 9:53
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
2
If your version of Linux supports systemd, use a systemd service with Restart set to always.
– Raman Sailopal
Mar 8 at 13:52
1
Use systemd service unit and Read the systemd man page.
– 炸鱼薯条德里克
Mar 8 at 14:12
1
You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.
– Michael D.
Mar 8 at 14:16
1
There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburgrc
. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.
– JdeBP
Mar 8 at 16:48
add a comment |
2
If your version of Linux supports systemd, use a systemd service with Restart set to always.
– Raman Sailopal
Mar 8 at 13:52
1
Use systemd service unit and Read the systemd man page.
– 炸鱼薯条德里克
Mar 8 at 14:12
1
You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.
– Michael D.
Mar 8 at 14:16
1
There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburgrc
. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.
– JdeBP
Mar 8 at 16:48
2
2
If your version of Linux supports systemd, use a systemd service with Restart set to always.
– Raman Sailopal
Mar 8 at 13:52
If your version of Linux supports systemd, use a systemd service with Restart set to always.
– Raman Sailopal
Mar 8 at 13:52
1
1
Use systemd service unit and Read the systemd man page.
– 炸鱼薯条德里克
Mar 8 at 14:12
Use systemd service unit and Read the systemd man page.
– 炸鱼薯条德里克
Mar 8 at 14:12
1
1
You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.
– Michael D.
Mar 8 at 14:16
You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.
– Michael D.
Mar 8 at 14:16
1
1
There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg
rc
. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.– JdeBP
Mar 8 at 16:48
There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg
rc
. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.– JdeBP
Mar 8 at 16:48
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
2
If your version of Linux supports systemd, use a systemd service with Restart set to always.
– Raman Sailopal
Mar 8 at 13:52
1
Use systemd service unit and Read the systemd man page.
– 炸鱼薯条德里克
Mar 8 at 14:12
1
You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.
– Michael D.
Mar 8 at 14:16
1
There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg
rc
. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.– JdeBP
Mar 8 at 16:48