I am trying to write my own (simple) systemd service that does something simple. (How to write numbers from 1 to 10 in a file using a shell script). My service file looks below.
[Unit] Description=NandaGopal Documentation=https:
This is my shell script.
#!/usr/bin/env bash source /etc/profile a=0 while [ $a -lt 10 ] do echo $a >> /var/log//t.txt a=`expr $a + 1` done
For some reason, the service does not appear, and systemctl shows the following result.
root@TARGET :~ >systemctl status -l hello * hello.service - NandaGopal Loaded: loaded (/usr/lib/systemd/system/hello.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: https://google.com
I tried to find out what went wrong in the last 2 days. Can anyone help me here?
Regards, nandanator
linux sh systemd systemctl
nandanator
source share