cleaner setup in /opt

This commit is contained in:
2026-08-11 18:52:41 +02:00
parent 84ea3b21a9
commit 8ebf939e81
4 changed files with 5 additions and 10 deletions
+2 -2
View File
@@ -25,11 +25,11 @@ 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
`/opt/cheap_system_monitor/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,
Edit `/opt/cheap_system_monitor/monitor.conf` to choose network interfaces,
mountpoints, and the graph directory. For example, use
`mountpoints = /, /boot/firmware, /mnt/data` to monitor two additional disks;
every configured path must be mounted and accessible.
+1 -1
View File
@@ -34,7 +34,7 @@ def graph(output: Path, rrd: Path, start: str, title: str, unit: str,
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--config", default="/etc/cheap-system-monitor.conf")
parser.add_argument("--config", default="/opt/cheap_system_monitor/monitor.conf")
args = parser.parse_args()
config_parser = configparser.ConfigParser()
if not config_parser.read(args.config):
+1 -6
View File
@@ -11,13 +11,8 @@ command -v rrdtool >/dev/null 2>&1 || {
exit 1
}
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
fi
systemctl daemon-reload
systemctl enable --now cheap-system-monitor.timer cheap-system-monitor-graphs.timer
echo "Installed. Edit /etc/cheap-system-monitor.conf if needed."
echo "Installed. Edit /opt/cheap_system_monitor/monitor.conf if needed."
+1 -1
View File
@@ -11,7 +11,7 @@ import subprocess
import time
DEFAULT_CONFIG = "/etc/cheap-system-monitor.conf"
DEFAULT_CONFIG = "/opt/cheap_system_monitor/monitor.conf"
DS_NAMES = (
"load1", "load5", "load15", "cpu_user", "cpu_system", "cpu_nice",
"net_in", "net_out", "disk_root", "disk_1", "disk_2", "memory",