Compare commits
5 Commits
95cf5bfe6b
...
v0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 4847eee540 | |||
| 19caa3ee83 | |||
| e523a024ec | |||
| 4a3dff646c | |||
| 986d2064a7 |
3
.gitm.toml
Normal file
3
.gitm.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[repos]
|
||||
origin = "ssh://git@192.168.100.62:2222/Arsen6331/itd.git"
|
||||
gitlab = "git@gitlab.com:moussaelianarsen/itd.git"
|
||||
4
Makefile
4
Makefile
@@ -4,8 +4,8 @@ SERVICE_PREFIX = $(DESTDIR)$(PREFIX)/lib/systemd/user
|
||||
CFG_PREFIX = $(DESTDIR)/etc
|
||||
|
||||
all:
|
||||
go build
|
||||
go build ./cmd/itctl
|
||||
go build $(GOFLAGS)
|
||||
go build ./cmd/itctl $(GOFLAGS)
|
||||
|
||||
install:
|
||||
install -Dm755 ./itd $(BIN_PREFIX)/itd
|
||||
|
||||
17
README.md
17
README.md
@@ -60,7 +60,7 @@ Use "itctl [command] --help" for more information about a command.
|
||||
|
||||
### Installation
|
||||
|
||||
To install, install the go compiler and make. Usually, go is provided by a package either named `go` or `golang`, and make is usually provided by `make`.
|
||||
To install, install the go compiler and make. Usually, go is provided by a package either named `go` or `golang`, and make is usually provided by `make`. The go compiler must be version 1.16 or newer for the `io/fs` module.
|
||||
|
||||
To install, run
|
||||
```shell
|
||||
@@ -69,6 +69,21 @@ make && sudo make install
|
||||
|
||||
---
|
||||
|
||||
### Starting
|
||||
|
||||
To start the daemon, run the following **without root**:
|
||||
|
||||
```shell
|
||||
systemctl --user start itd
|
||||
```
|
||||
|
||||
To autostart on login, run:
|
||||
```shell
|
||||
systemctl --user enable itd
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Cross compiling
|
||||
|
||||
To cross compile, simply set the go environment variables. For example, for PinePhone, use:
|
||||
|
||||
@@ -36,9 +36,10 @@ var timeCmd = &cobra.Command{
|
||||
// Ensure required arguments
|
||||
if len(args) != 1 {
|
||||
cmd.Usage()
|
||||
log.Fatal().Msg("Command time requires one argument")
|
||||
log.Warn().Msg("Command time requires one argument")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// Connect to itd UNIX socket
|
||||
conn, err := net.Dial("unix", SockPath)
|
||||
if err != nil {
|
||||
|
||||
@@ -60,7 +60,8 @@ var upgradeCmd = &cobra.Command{
|
||||
}
|
||||
} else {
|
||||
cmd.Usage()
|
||||
log.Fatal().Msg("Upgrade command requires either archive or init packet and firmware.")
|
||||
log.Warn().Msg("Upgrade command requires either archive or init packet and firmware.")
|
||||
return
|
||||
}
|
||||
|
||||
// Encode response into connection
|
||||
|
||||
Reference in New Issue
Block a user