_
_
_ Disciple2017-06-07 09:15:57
linux
_ Disciple, 2017-06-07 09:15:57

How to automatically run a parameter file in Ubuntu?

Hi everybody.
OS - Ubuntu 16.04
And so. The folder contains an executable file. I run it through the command line with the command: ./name_file -c cp-conf.json . And then the script is executed cyclically until it is turned off. After rebooting the system, you have to restart the startup procedure. Tell me how to make automatic loading of the script with parameters on the command line so that you do not have to do this every time with pens?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
pfg21, 2017-06-07
@aafrimenaa

as a small life hack, you can hang execution flags on the config. and to register the executable program in the config itself through shebang
#! /path/to/name_file -c
is convenient.
but, with the future in mind, it's better to create a systemd.service script with Type=oneshot.

D
Dmitri Sinitsa, 2017-06-07
@unabl4

On 14.04 - upstart
From 16.04+ - systemd

_
_ Disciple, 2017-06-08
@aafrimenaa

Kind of weird. I tried the autoload options, and none of them work =( Tell me how to add files to autoload in order

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question