This might sound like a duplicate, but hear me out first.
I run a shell script, which has a standard input active and sometimes on startup requires some input. I need for it to run 24/7 and it needs restart on failure by either inputting a command or just inputting "y" if the prompt pops up.
I've already tried two methods: using nohup and clicking Ctrl+Z, typing bg both show the job as stopped and it's not running. Only when I execute
fg it goes active. Any clue how to solve this?
P.S I've also tried
scriptcommand & it ends up with "Stopped" as well.
Would setting it up as a systemd service make sense?