Skip to content

Commit

Permalink
Merge pull request #1 from dperez-sct/docker
Browse files Browse the repository at this point in the history
Añadido Dockerfile
  • Loading branch information
dperez-sct authored Apr 27, 2021
2 parents 2a8eb44 + 6530a02 commit 6bfd03f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
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
16 changes: 16 additions & 0 deletions fan_control.sh
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

0 comments on commit 6bfd03f

Please sign in to comment.