Skip to content

[Bug]: The automated install script netclient-install.sh does not create the service file. #59

Open
@prouveyrol

Description

@prouveyrol

Contact Details

No response

What happened?

Running

curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/master/scripts/netclient-install.sh | KEY=<sometoken> sh -

On a fresh ubuntu 22.04 server, does not create the service file.

Looking at the script, at line 216 we see : 

if [ "${OS}" = "OpenWRT" ]; then
        mv ./netclient /sbin/netclient
        cat << 'END_OF_FILE' > ./netclient.service.tmp
        
        <some init file>
        
END_OF_FILE
        mv ./netclient.service.tmp /etc/init.d/netclient
        chmod +x /etc/init.d/netclient
        /etc/init.d/netclient enable
        /etc/init.d/netclient start
else
        rm -f netclient
fi

But in the case of an amd64 distro, it simply downloads the binary (not the deb), and runs the join, without creating the service file.

Considering lines 12 to 52, I think that you either were using packages in the past, or are planning to. But currently, the script as is does not function as expected, as the netclient will not be restarted upon reboot. It is not even moved to /usr/bin so trying to run netclient leave… will not work either, as the binary sits where the script was run.

Version

v0.14.3

What OS are you using?

Linux

Relevant log output

[netclient] 2022-06-22 09:42:40 joining testnet at api.netmaker.<mydomain>.systems:443
[netclient] 2022-06-22 09:42:40 starting wireguard
[netclient] 2022-06-22 09:42:42 certificates/key saved
[netclient] 2022-06-22 09:42:42 sent a node update to server for node <myservername> ,  <uuid>
[netclient] 2022-06-22 09:42:44 error running command: systemctl restart netclient.service
[netclient] 2022-06-22 09:42:44 Failed to restart netclient.service: Unit netclient.service not found.


### Contributing guidelines

- [X] Yes, I did.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions