Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Fan-Control-Daemon
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CeRiAl
Fan-Control-Daemon
Commits
a6cc7a45
Commit
a6cc7a45
authored
Jun 15, 2012
by
Daniel Graziotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(sort of) fixes #8
parent
3551dcc3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
8 deletions
+28
-8
Makefile
Makefile
+7
-0
README.md
README.md
+16
-3
daemon.c
src/daemon.c
+2
-2
main.c
src/main.c
+2
-2
mbpfan.c
src/mbpfan.c
+1
-1
No files found.
Makefile
View file @
a6cc7a45
...
@@ -54,6 +54,13 @@ clean:
...
@@ -54,6 +54,13 @@ clean:
install
:
install
:
cp
$(EXE)
/usr/sbin
cp
$(EXE)
/usr/sbin
@
echo
"-----------------------------------------------------------------------------"
@
echo
"An init file suitable for /lib/lsb/init-functions (Debian & Ubuntu fur sure)"
@
echo
"Is located in the main folder of the source files. It is called mbpfan.init."
@
echo
"Rename it to mbpfan, give it execution permissions (chmod +x mbpfan)"
@
echo
"and move it to /etc/init.d"
@
echo
"Then, add it to the default runlevels with sudo update-rc.d mbpfan defaults"
@
echo
"-----------------------------------------------------------------------------"
rebuild
:
clean all
rebuild
:
clean all
#rebuild is not entirely correct
#rebuild is not entirely correct
README.md
View file @
a6cc7a45
...
@@ -29,16 +29,29 @@ Install Instructions
...
@@ -29,16 +29,29 @@ Install Instructions
--------------------
--------------------
Install with
Install with
make install
sudo make install
It actually copies mbpfan to /usr/sbin.
An init file suitable for /lib/lsb/init-functions (Debian & Ubuntu fur sure)
Is located in the main folder of the source files. It is called mbpfan.init.
Rename it to mbpfan, give it execution permissions (chmod +x mbpfan)
and move it to /etc/init.d
Then, add it to the default runlevels with sudo update-rc.d mbpfan defaults (Ubuntu example)
It actually copies mbpfan to /usr/sbin,
Run Instructions
Run Instructions
---------------------
---------------------
R
un with
If not installed, r
un with
sudo bin/mbpfan
sudo bin/mbpfan
If installed, manually run with
sudo mbpfan
If installed and using the init file, run with (Ubuntu example)
sudo service mbpfan start
License
License
---------------------
---------------------
...
...
src/daemon.c
View file @
a6cc7a45
...
@@ -85,7 +85,7 @@ void signal_handler(int signal)
...
@@ -85,7 +85,7 @@ void signal_handler(int signal)
}
}
}
}
void
go_daemon
(
void
(
*
mbpfan
)())
void
go_daemon
(
void
(
*
fan_control
)())
{
{
// Setup signal handling before we start
// Setup signal handling before we start
...
@@ -168,7 +168,7 @@ void go_daemon(void (*mbpfan)())
...
@@ -168,7 +168,7 @@ void go_daemon(void (*mbpfan)())
}
}
mbpfan
();
fan_control
();
if
(
daemonize
){
if
(
daemonize
){
syslog
(
LOG_INFO
,
"%s daemon exiting"
,
program_name
);
syslog
(
LOG_INFO
,
"%s daemon exiting"
,
program_name
);
...
...
src/main.c
View file @
a6cc7a45
...
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
...
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
}
}
// pointer to mbpfan() function in mbpfan.c
// pointer to mbpfan() function in mbpfan.c
void
(
*
mbpfan
)()
=
mbpfan
;
void
(
*
fan_control
)()
=
mbpfan
;
go_daemon
(
mbpfan
);
go_daemon
(
fan_control
);
exit
(
0
);
exit
(
0
);
}
}
\ No newline at end of file
src/mbpfan.c
View file @
a6cc7a45
...
@@ -52,7 +52,7 @@ int low_temp = 63; // try ranges 55-63
...
@@ -52,7 +52,7 @@ int low_temp = 63; // try ranges 55-63
int
high_temp
=
66
;
// try ranges 58-66
int
high_temp
=
66
;
// try ranges 58-66
int
max_temp
=
86
;
// do not set it > 90
int
max_temp
=
86
;
// do not set it > 90
int
polling_interval
=
5
;
int
polling_interval
=
7
;
struct
s_sensors
{
struct
s_sensors
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment