2.9 KiB
dengitool
simple but horrible scripting tool focused on microslop bindows servers written in go
example instalation
dtool.exeis portable, you can use any directory
- Create folder and copy
dtool.exe. For example inC:\dtooll - Add to env
PATHyour folder - That's it! Open a terminal and try to run
dtool -h
setup app
example tree
config
└───<application>
└───<module>
└───run
customscript.ps1
check.ps1
config.yml
fix.ps1
restart.ps1
start.ps1
stop.ps1
TIP: you can leave only scripts that you need
you can write scripts in any language you want which is supported by built-in script runners, OR you can write your own custom runner
check
for checkking status you can use either your script or you can write in config.yml check-url (details)
restart
you can define restart script or it would use start and stop
config
currently there are config for application, example:
name: my-application
and for module
name: my-module
#
check-url: https://example.com
# or
check-url: https://example.com 200
# or even
check-url: https://example.com 200 Test%20Body%20Text
# or don't define at all
#
for now that's it.
usage
Usage:
dtool [application] [action] [module] [flags]
Flags:
-h, --help help for dtool
--list list configured applications and modules
--list-runners list configured script runners
--silent suppress all output
--verbose enable debug output
you can use everything for application
just dtool is alias for dtool everything check
actions
check/fix/restart/start/stop |
runs it's script (or check have url defined) |
run [script name] |
runs script in run subdirectory |
runners
dengitool automaticly detects available script extension
built-in
| name | extension |
|---|---|
| Windows Executable | .exe |
| PowerShell Script | .ps1 |
| Python | .py |
| CMD Batch File | .bat |
| NodeJS | .js |
custom runners
you can create your own runners
for this, you need to create a .yml file at folder runners near dtool.exe
you can override script for built-in extension
here is an example:
# runners/bun.yml
name: My Bun Runner
extension: .ts
runner: bun run %v
%v- absolute script path
now you can see it in dtool --list-runners
