I find your post kind of confusing, but I'll give it a shot...
>> > stopapp.sh script
>> > #!/sbin/sh
>> > #shutdown processes before backup
>> > su - myapps
>> > cd $HOME/System/bin
I think this is part of your problem. You want to cd to
(myapps' home directory)/System/bin? The above script will not do that.
"su" spawns a separate shell as the new user; it does _not_ change the UID
for the current shell. So $HOME will be interpreted as $HOME for the user
who originally ran the script. (I also have no idea what this script is
supposed to accomplish, since it looks like it does an su and then a cd
and nothing else, but you didn't ask me, so...)
Quote:>> > when i came to work on monday, i got a mail from the system which is
>> > as belows
>> > stty: : No such device or address
>> > stty: : No such device or address
>> > logout
My guess is that stty gets run in the shell initialization scripts
for the user "myapps", but whatever the script is using as a terminal is
not really a terminal, so stty gets confused. You can reproduce this
message with
stty </dev/null
Quote:>> > /sysadmin/bkup/bin/stopappprocess.sh: //System/bin: does not exist
I thought you said it was called stopapp.sh? Or is
stopappprocess.sh a separate script on the system? I don't care if you
use made-up names for things, but if you do, at least keep them consistent.
Anyway, Umberto pretty much had things right. To help you any
further, we'd need to know who the script originally gets run as, and
what's in the shell startup scripts for the user "myapps".
--
If mail to me bounces, try removing the "+STRING" part of the address.