Socket
Book a DemoInstallSign in
Socket

config-watcher-cli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

config-watcher-cli

a tool used to monitor a config file and trigger a command

0.0.2
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

config-watcher-cli

a tool used to watch config file and react when the config file has been changed.

Installation

  npm i config-watcher-cli -g

How to use

Open your command line or shell and key in,

config-watcher-cli -s <source of your images> -d <destination of your images>

    Usage: index [options]
  
    Options:
  
      -V, --version             output the version number
      -c, --config <value>      config file path
      -C, --cmd <value>         if any changes from config file can trigger current cmd
      -w, --watch-mode [value]  watch file mode [add, change, unlink], default: add and change
      -h, --help                output usage information

watch-mode

Listen for an FS event. Available events: add, change, unlink. default is add and change if no set.

Example

common case, lets say if we need to watch the shadowsocks.json. If any changes applies to it, it will restart the shadowsocks:

config-watcher-cli -c "/etc/shadowsocks.json" -C "ssserver -c /etc/shadowsocks.json -d restart"

with specific watch mode, react whenever delete target file:

config-watcher-cli -c "/etc/shadowsocks.json" -C "ssserver -c /etc/shadowsocks.json -d restart" -w "unlink"

Author

Ailun She

Keywords

config-watcher

FAQs

Package last updated on 20 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.