I have a script I want to run on a many servers. It essentially is cleaning up some old files from an old application.
It's designed to run locally on the server itself. It has a few functions within...kill necessary processes associated with cleanup, check if filesystem exists, if so, remove it, check for entry in inittab, if exist, remove it, remove a few files associated with old application.
So I could just do a for $i in servers.lst do scp myscript then another for loop to ssh the script. But then all my logging will be on the server and not local.
Could I just encapsulate myscript.ksh in a startmyscript.ksh which will log everything local?
It's designed to run locally on the server itself. It has a few functions within...kill necessary processes associated with cleanup, check if filesystem exists, if so, remove it, check for entry in inittab, if exist, remove it, remove a few files associated with old application.
So I could just do a for $i in servers.lst do scp myscript then another for loop to ssh the script. But then all my logging will be on the server and not local.
Could I just encapsulate myscript.ksh in a startmyscript.ksh which will log everything local?