gomanager/README.md

64 lines
1.0 KiB
Markdown

# gomanager
## description
Go Manager is a program that watches your package binaries and if they're not the same version of your installed go version, it rebuilds the packages.
all commands **must** be ran as root
## install
```bash
CGO_ENABLED=1 go install code.icod.de/dalu/gomanager@latest
mv ~/go/bin/gomanager /usr/local/bin/
gomanager setup
```
## usage
### add project
```bash
gomanager add \
--root-path="" \
--binary-path="" \
--service-name="" \
```
### remove project
```bash
gomanager remove
```
### start/run
```bash
gomanager start
```
### systemd service
read the contrib directory
The runner is ran every 24 hours.
### cron job
This runs the watcher every day a 2am
```bash
crontab -e
```
```cronexp
0 2 * * * /usr/local/bin/gomanager cron
```
### systemd timer
see the
- contrib/gomanager-cron.service
- contrib/gomanager-cron.timer
copy to `/etc/systemd/system/` and
```bash
systemctl enable --now gomanager-cron.timer
```
# uninstall
```bash
gomanager clean
rm /usr/local/bin/gomanager
```