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

Create odroid-xu3-fan-control.service #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions odroid-xu3-fan-control.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file was autogenerated by node-deb 0.1.6

[Unit]
Description=odroid-xu3-fan-control

[Service]
Type=simple
WorkingDirectory=/home/odroid/odroid-xu3-fan-control
ExecStart=/usr/home/odroid/odroid-xu3-fan-control/odroid-xu3-fan-control.sh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just tested this. But doesn't work. Is /usr/home/.. prefix an issue? Typo?

nthx@odroid:~$ sudo cp odroid-xu3-fan-control.service /etc/systemd/system

nthx@odroid:~$ ll /home/odroid/odroid-xu3-fan-control
total 16
-rw-rw-r-- 1 nthx nthx 1080 Nov 23 23:34 LICENSE
-rwxrwxr-x 1 nthx nthx 1963 Nov 23 23:34 odroid-fan-controller*
-rwxrwxr-x 1 nthx nthx 2591 Nov 23 23:34 odroid-xu3-fan-control.sh*
-rw-rw-r-- 1 nthx nthx 1431 Nov 23 23:38 README.md

nthx@odroid:~$ sudo service odroid-fan-controller start
Failed to start odroid-fan-controller.service: Unit odroid-fan-controller.service failed to load: No such file or   directory.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right

ExecReload=/bin/kill -HUP $MAINPID
Restart=always
User=odroid
ExecStartPre=/bin/mkdir -p /run/odroid-xu3-fan-control
ExecStartPre=/bin/chown odroid:odroid /run/odroid-xu3-fan-control
ExecStartPre=/bin/chmod 755 /run/odroid-xu3-fan-control
PermissionsStartOnly=true

[Install]
WantedBy=multi-user.target