# This is an example of a pmux configuration file. # timeFormat defines the formatting of timestamps. See # https://pkg.go.dev/time#pkg-constants for more info on how the formatting # string works. # # If timeFormat isn't set then the time is not included in each log line. #timeFormat: "2006-01-02T15:04:05.000Z07:00" # processes is the only required field, it must have at least one process # defined. processes: # each process must have a name and cmd. - name: pinger cmd: /bin/bash args: - "-c" - while ping -c1 $TARGET; do sleep 1; done env: TARGET: example.com dir: "/tmp" # pmux uses an exponential backoff when restarting a process, so subsequent # restarts will each take longer and longer. minWait/maxWait indicate the # min/max wait times between restarts of this process, respectively. # # The values shown here are the defaults if none are given. minWait: 1s maxWait: 64s # once pmux has signalled a process to stop, it will wait this long for the # process to exit before sending it a SIGKILL (aka a kill -9). sigKillWait: 10s # This process will not immediately exit when pmux tells it to do so, but pmux # will SIGKILL it after sigKillWait has elapsed. - name: stubborn-pinger cmd: /bin/bash args: - "-c" - | trap "echo 'i will never stop, you will have to SIGKILL me!' >&2" SIGINT while ping -c1 example.com; do sleep 1; done sigKillWait: 1s