5 Commits

5 changed files with 26 additions and 6 deletions

3
.gitm.toml Normal file
View File

@@ -0,0 +1,3 @@
[repos]
origin = "ssh://git@192.168.100.62:2222/Arsen6331/itd.git"
gitlab = "git@gitlab.com:moussaelianarsen/itd.git"

View File

@@ -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

View File

@@ -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:

View File

@@ -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 {

View File

@@ -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