Create a Service in RHEL 9.0 | Tutorial | RHCSA | RHCE
-------------------------------------------------------------------------------------------------------------
vi /etc/systemd/system/sample.service
[Unit] Description=Description for sample script goes here After=network.target
[Service] Type=simple ExecStart=/var/tmp/myscript.sh TimeoutStartSec=0
[Install] WantedBy=default.target
If the script needs any other system facilities (networking, etc), modify the [Unit] section to include appropriate After=, Wants=, or Requires= directives.
Type= : Switch Type=simple for Type=idle in the [Service] section to delay execution of the script until all other jobs are dispatched
WantedBy= : target
----------------------------------------------------------------------------------------------------------------
systemctl daemon-reload
systemctl enable sample.service
systemctl start sample.service
systemctl reboot
Details: https://github.com/sunilkvasu/How-to-...
Source: SimplyLearn | Sunil KV | License
Creative Commons Attribution license (reuse allowed)
Must watch ❤️
Linux Data Science Project #1: How to Analyze US University Ranks at Linux Command Line?
• Linux Data Science Project #1: How to...
Linux Data Science Project #2: Facebook Data Analytics with Linux Bash Shell
• Linux Data Science Project #2: Facebo...
Linux Data Science Project #3: Statistical Data Analytics with Linux Bash Shell
• Linux Data Science Project #3: Statis...
Learn Practical Data Sciences with Bash Shell: Full Video Course!
• Learn Practical Data Sciences with Ba...
Scientific Programming School - An Introduction
• Scientific Programming School - An In...
Join us! 🚀
Like our FB Page: / learnscientific
Our Website: https://scientificprogramming.io/