diff --git a/README.md b/README.md index afd6e4b..fcf56d5 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,12 @@ sudo apt install rrdtool sudo ./install.sh ``` +The executable application files are installed under +`/opt/cheap_system_monitor`. Configuration remains in +`/etc/cheap-system-monitor.conf`, and the RRD database remains under +`/var/lib/cheap-system-monitor` so code, configuration, and mutable data stay +separate. + Edit `/etc/cheap-system-monitor.conf` to choose network interfaces, mountpoints, and the graph directory. For example, use `mountpoints = /, /boot/firmware, /mnt/data` to monitor two additional disks; diff --git a/install.sh b/install.sh index 89e508b..2e1e2b4 100755 --- a/install.sh +++ b/install.sh @@ -11,8 +11,8 @@ command -v rrdtool >/dev/null 2>&1 || { exit 1 } -install -d /usr/local/lib/cheap-system-monitor /var/lib/cheap-system-monitor -install -m 0755 system_monitor.py generate_graphs.py /usr/local/lib/cheap-system-monitor/ +install -d /opt/cheap_system_monitor /var/lib/cheap-system-monitor +install -m 0755 system_monitor.py generate_graphs.py /opt/cheap_system_monitor/ install -m 0644 systemd/*.service systemd/*.timer /etc/systemd/system/ if [ ! -e /etc/cheap-system-monitor.conf ]; then install -m 0644 cheap-system-monitor.conf.example /etc/cheap-system-monitor.conf diff --git a/systemd/cheap-system-monitor-graphs.service b/systemd/cheap-system-monitor-graphs.service index 984b20c..80d1a0b 100644 --- a/systemd/cheap-system-monitor-graphs.service +++ b/systemd/cheap-system-monitor-graphs.service @@ -4,5 +4,5 @@ After=cheap-system-monitor.service [Service] Type=oneshot -ExecStart=/usr/local/lib/cheap-system-monitor/generate_graphs.py +ExecStart=/opt/cheap_system_monitor/generate_graphs.py User=root diff --git a/systemd/cheap-system-monitor.service b/systemd/cheap-system-monitor.service index 6c8fffd..d12a80d 100644 --- a/systemd/cheap-system-monitor.service +++ b/systemd/cheap-system-monitor.service @@ -4,5 +4,5 @@ After=local-fs.target [Service] Type=oneshot -ExecStart=/usr/local/lib/cheap-system-monitor/system_monitor.py +ExecStart=/opt/cheap_system_monitor/system_monitor.py User=root