-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dperez-sct/docker
Añadido Dockerfile
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM alpine:3.13.5 | ||
ENV TERM=xterm-256color | ||
COPY ./fan_control.sh / | ||
|
||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.7/community" >> /etc/apk/repositories && \ | ||
apk --update upgrade && \ | ||
apk add \ | ||
openssh-client \ | ||
sshpass && \ | ||
rm -rf /var/cache/apk/* && \ | ||
chmod +x /fan_control.sh | ||
|
||
ENV SSHPASS=pass_usuario | ||
ENV USER=pass | ||
ENV IP=0.0.0.0 | ||
ENV LO=2500 | ||
ENTRYPOINT /fan_control.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
################################################# | ||
################################################# | ||
#####CREDITS:#################################### | ||
## https://www.reddit.com/r/homelab/comments/hix44v/silence_of_the_fans_pt_2_hp_ilo_4_273_now_with/gc41oh7?utm_source=share&utm_medium=web2x&context=3 | ||
################################################# | ||
################################################# | ||
################################################# | ||
################################################# | ||
#!/bin/sh | ||
while true; do | ||
for PID in 50 31 40 45 46 49 | ||
do | ||
sshpass -e ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -oKexAlgorithms=+diffie-hellman-group1-sha1 $USER@$IP "fan pid $PID lo $LO" | ||
done | ||
sleep 300 | ||
done |