I use webmin for administrate my dedicated server (Centos 7 64 bits) and from there I create cron jobs, I am executing an .sh script as root which contains:
#!/bin/bash
screen -dmS aud
screen -S aud -X stuff "node /home/AuditTrail-Web/app.js
"`echo -ne '\015'`
Cron job execute that script on startup and when I join to that screen using:
screen -r aud
I get something similar to this(maybe named prompt?):
sh-4.2#
Which does not allow me sometimes to execute some commands like fuser and some other like node /home/AuditTrail-Web/app.js
But if I create the screen manually I get:
[root@Martin ~]#
And that allows me to execute everything.
What is the problem with sh-4.2# and why it is present in that form?
Thank