Starting a process over ssh using bash and then killing it on sigint

前端 未结 5 743

I want to start a couple of jobs on different machines using ssh. If the user then interrupts the main script I want to shut down all the jobs gracefully.

Here is a shor

5条回答
  •  耶瑟儿~
    2021-02-02 16:05

    You may want to consider mounting the remote file system and run the script from the master box. For instance, if your kernel is compiled with fuse (can check with the following):

    /sbin/lsmod | grep -i fuse
    

    You can then mount the remote file system with the following command:

    sshfs user@remote_system: mount_point
    

    Now just run your script on the file located in mount_point.

提交回复
热议问题