-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·44 lines (33 loc) · 1.11 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·44 lines (33 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
if [ "$(whoami)" != "root" ]; then
echo "Script must be executed as root"
fi
if ! test -f /sys/class/drm/card0/device/hwmon/hwmon1/fan1_target
then
echo "Error: your system appears to not be compatible with this software"
echo "In order to use amd-gpu-fan service, you must have an AMD GPU in your system and updated drivers"
echo "If you think this is a mistake, please report the situation to the developer creating an issue at:"
echo "https://github.com/cpy-dev/amd-gpu-fan"
exit 0
fi
echo "Creating directory structure"
mkdir -p /etc/amd-gpu-fan/conf
echo "Copying standard configurations and daemon"
cp ./daemon/* /etc/amd-gpu-fan/ -r
echo "Enabling daemon"
systemctl enable /etc/amd-gpu-fan/amd-gpu-fan.service
systemctl start amd-gpu-fan.service
echo "Copying bins"
mkdir -p /usr/share/amd-gpu-fan/
cp ./src/* /usr/share/amd-gpu-fan/
chmod +x ./bin/*
cp ./bin/* /usr/local/bin
echo "Running setup for gui"
current=$(pwd)
cd /usr/share/amd-gpu-fan/
python3 -m venv amd-gpu-fan-venv
source amd-gpu-fan-venv/bin/activate
python3 -m pip install -r requirements.txt
deactivate
cd $current
echo "Done"