Skip to content

Commit

Permalink
add examples and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tclh123 committed Jul 25, 2019
1 parent ca4fd43 commit b27b2b0
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
# SA Tools Core

SA Tools 顾名思义是 System Administrator 的工具集,包含一些实用工具,涉及 DNS 管理、远程批量执行脚本、日志分析查询、通知提醒等。

## Development guide

Currently support python2.7 ~ python3.7

### quick start
### Quick start

```
make init
```

### re-install after modify codes
### Re-install after modify codes

```
make install
```

## Configuration

```
cp local_config.py.example local_config.py
# then edit local_config.py
vi local_config.py
```

You can use a system-wide configuration path as well, by default it is `/etc/sa-tools/`, it can be configured via `CONFIG_DIR`.

Local configs will override [sa_tools_core/consts.py](sa_tools_core/consts.py).

For other third party service configs, see [examples/config](examples/config).

You can put third party service configs to `/etc/sa-tools/` directory.

## Command Line Tools

For all the CLI tools, you can type `-h` or `--help` to get help messages and examples.
Expand Down
1 change: 1 addition & 0 deletions examples/config/dns_monitor_callback_key
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xxxxxxxxxxxxxxx
1 change: 1 addition & 0 deletions examples/config/dnspod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10001,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,*
16 changes: 16 additions & 0 deletions examples/config/external_domains
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[main]
www
book
movie
music

[top_level_record]
@

[example2.com:top_level_record]
@

[example2.com:all]
*.host1
host2
host3
1 change: 1 addition & 0 deletions examples/config/icinga
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user:password
1 change: 1 addition & 0 deletions examples/config/pushbullet
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1 change: 1 addition & 0 deletions examples/config/pushover
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1 change: 1 addition & 0 deletions examples/config/telegram
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
111111111:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1 change: 1 addition & 0 deletions examples/config/wechat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wxaaaaaaaaaaaaaaaa:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:1
1 change: 1 addition & 0 deletions examples/config/wework
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
XXXXXXXXXXXXXXXXXX:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY:1000001

0 comments on commit b27b2b0

Please sign in to comment.