Skip to content

Commit

Permalink
Fixixng install messaging, #103
Browse files Browse the repository at this point in the history
  • Loading branch information
daonb committed Jun 4, 2024
1 parent 65f13f5 commit 90c10f3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ and the release workflow reads it to set github's release notes.
### Added

- the status command shows the chosen ICE candidate pairs for connected peers
- WEBEXEC environment variable to hold the unix socket path

### Fixed

- installer messages improved

## [1.4.0] 2024-4-14

Expand Down
2 changes: 1 addition & 1 deletion conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ func parseConf(s string) (*peers.Conf, httpserver.AddressType, error) {
Conf.insecure = v.(bool)
}
// get env vars
peersConf.Env = map[string]string{"WEBEXEC": GetSockFP()}
m := t.Get("env")
if m != nil {
peersConf.Env = make(map[string]string)
for k, v := range m.(*toml.Tree).ToMap() {
peersConf.Env[k] = v.(string)
}
Expand Down
2 changes: 1 addition & 1 deletion conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import (

func TestConfEnv(t *testing.T) {
initTest(t)
require.EqualValues(t, Conf.peerConf.Env["TERM"], "xterm")
require.EqualValues(t, Conf.peerConf.Env["TERM"], "xterm-256color")
require.EqualValues(t, Conf.peerConf.Env["COLORTERM"], "truecolor")
}
7 changes: 3 additions & 4 deletions sites/get/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ do_install() {
cd $tmp
fi
get_n_extract $tmp
if [[ $(ps -o comm= -p $PPID) == *webexec ]]
if [ -v WEBEXEC ]
then
if [ ! -d $HOME/.config/webexec ]
then
./webexec init
fi
echo "Moving to another shell to survive this connection ending"
$sh_c "nohup bash ./replace_n_launch.sh $user ${HOME:-/root}"
echo "Closing connections, replacing and launching"
nohup bash ./replace_n_launch.sh "$sh_c"
else
if command_exists webexec
then
Expand All @@ -156,7 +156,6 @@ do_install() {
then
exit "Failed starting webexec"
fi
echo "Install finished, please exit and reconnect to enjoy version $LATEST_VERSION."
fi
}
do_install "$@"
2 changes: 1 addition & 1 deletion webexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func start(c *cli.Context) error {
if err != nil {
return err
}
fmt.Printf("agent started as process #%d\n", pid)
fmt.Printf("Agent started as process #%d\n", pid)
versionNote := getVersionNote()
if versionNote != "" {
fmt.Println(versionNote)
Expand Down

0 comments on commit 90c10f3

Please sign in to comment.