2023-12-01 23:02:33 +01:00
|
|
|
# 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
|
2023-12-01 23:16:20 +01:00
|
|
|
CGO_ENABLED=1 go install code.icod.de/dalu/gomanager@latest
|
2023-12-01 23:02:33 +01:00
|
|
|
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
|
|
|
|
```
|