Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run from boot on Ubuntu 16.04 #3

Open
cdysthe opened this issue Aug 11, 2016 · 4 comments
Open

How to run from boot on Ubuntu 16.04 #3

cdysthe opened this issue Aug 11, 2016 · 4 comments

Comments

@cdysthe
Copy link

cdysthe commented Aug 11, 2016

Hi,

I am not a developer so please bear with me. I have followed the installation instructions and I can run yoga_fan with "sudo ./yoga_fan. I then ran this:

sudo -s
make install
update-rc.d yoga_fan_daemon defaults

The install went well with this output:

-- Up-to-date: /usr/local/usr/bin/yoga_fan
-- Up-to-date: /usr/local/etc/init.d/yoga_fan_daemon

I get this error message:

update-rc.d: error: initscript does not exist: /etc/init.d/yoga_fan_daemon

I also enabled the service with systemd and the symlink was created. When I reboot I can not see a yoga_fan process. What am I missing?

@Cono52
Copy link

Cono52 commented Aug 20, 2016

had the same problem, inside the lenovo_yoga_fan_control, run the comman cp yoga_fan_daemon ../../../etc/init.d

then try running the update command again

@senior-sigan
Copy link
Owner

Hello, @Cono52 and @cdysthe.
Seems it's a bug with cmake install path. I faced it once, when make install command put binary file and init.d script in the /usr/local/ prefix instead of /, i.e. just root prefix.
Anyway, I can recommend you only make project and manually copy all files to the locations:

cd lenovo-yoga-fan-control
cmake CMakeLists.txt
make
# sudo ./yoga_fan # just check whether it's working or not :)
# do not run make install
sudo cp yoga_fan /usr/bin/yoga_fan
sudo cp yoga_fan_daemon /etc/init.d/yoga_fan_daemon
sudo chmod 755 /usr/bin/yoga_fan /etc/init.d/yoga_fan_daemon
sudo update-rc.d yoga_fan_daemon defaults
# sudo /etc/init.d/yoga_fan_daemon restart # check init script

I believe it will work.

P.S. A thousand apologies for so late answer 😔.

@cdysthe
Copy link
Author

cdysthe commented Aug 22, 2016

Quick question. If i run it with systemd do i need to worry about this at all? Thank you for getting back to us on this! :-)

@senior-sigan
Copy link
Owner

@cdysthe
If you use system.d you should copy the service file yoga_fan.service to the /etc/systemd/system/ directory. After that enable service by sudo systemctl enable yoga_fan.service. That's all if I'm not mistaken. So you can chose init.d script or system.d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants