Merge branch 'main' into G114
This commit is contained in:
commit
9d6af6fced
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -17,7 +17,10 @@
|
|||
*.out
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
vendor/
|
||||
|
||||
# Task files
|
||||
.task
|
||||
|
||||
# Go workspace file
|
||||
go.work
|
||||
|
|
|
@ -37,7 +37,12 @@ In it's current implementation, `weblug` requires to remain running as root with
|
|||
make # Build weblug
|
||||
make static # Make a static binary
|
||||
|
||||
Alternatively you there is also a [Taskfile](https://taskfile.dev)
|
||||
|
||||
task
|
||||
task static # Build static binary
|
||||
|
||||
## Run as systemd unit
|
||||
|
||||
This repository provides an example [weblug.service](weblug.service), which can be used to start `weblug` as systemd service.
|
||||
This file can be placed in `/etc/systemd/system/weblug.service` and in conjunction with an adequate `weblug.yml` file e.g. in `/etc/weblug.yml` this provides a way of running weblug as a native systemd service.
|
||||
This file can be placed in `/etc/systemd/system/weblug.service` and in conjunction with an adequate `weblug.yml` file e.g. in `/etc/weblug.yml` this provides a way of running weblug as a native systemd service.
|
||||
|
|
32
Taskfile.yml
Normal file
32
Taskfile.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
# https://taskfile.dev
|
||||
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- go build -o weblug cmd/weblug/*.go
|
||||
silent: false
|
||||
aliases: [weblug]
|
||||
generates:
|
||||
- weblug
|
||||
sources:
|
||||
- cmd/weblug/*.go
|
||||
static:
|
||||
cmds:
|
||||
- go build -ldflags="-w -s" -o weblug cmd/weblug/*.go
|
||||
env:
|
||||
CGO_ENABLED: '0'
|
||||
silent: false
|
||||
aliases: [weblug-static]
|
||||
generates:
|
||||
- weblug
|
||||
sources:
|
||||
- cmd/weblug/*.go
|
||||
test:
|
||||
deps: [weblug]
|
||||
# Ensure a weblug binary is present
|
||||
preconditions:
|
||||
- test -f weblug
|
||||
cmds:
|
||||
- sudo bash -c "cd test && ./blackbox.sh"
|
Loading…
Reference in a new issue