Если unit-файл создан и система перезагружена, запустится ли скрипт?
Asked at
AI answer
Not necessarily. The mere presence of a unit file does not enable it to start at boot. With systemd, you usually need to reload the configuration (systemctl daemon-reload) and enable the unit (systemctl enable name.service); the file must contain a valid [Install] section, such as WantedBy=multi-user.target. To start it immediately, use systemctl enable --now name.service. Also check the script path and its execute permissions.
Also asked at Касперский
Similar questions
- And how do you run that image afterward?
- What is usually used for unit tests?
- How much did you engage in less interesting tasks related to service decomposition and unit testing improvements; what were the coverage requirements?
- After implementing support for the new database system and covering the code with unit tests, what are your next steps?
- Tell us how you write unit tests and what you pay attention to during testing.