add cpu power mode

This commit is contained in:
PaulVua
2026-01-15 14:13:41 +01:00
parent 994bbf7a8d
commit 8291475e36
8 changed files with 565 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
[Unit]
Description=NebuleAir CPU Power Mode Service
After=multi-user.target
Wants=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /var/www/nebuleair_pro_4g/power/apply_cpu_mode_from_db.py
User=root
StandardOutput=journal
StandardError=journal
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@@ -270,6 +270,25 @@ Persistent=false
WantedBy=timers.target
EOL
# Create service file for CPU Power Mode (runs once at boot)
cat > /etc/systemd/system/nebuleair-cpu-power.service << 'EOL'
[Unit]
Description=NebuleAir CPU Power Mode Service
After=multi-user.target
Wants=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/bin/python3 /var/www/nebuleair_pro_4g/power/apply_cpu_mode_from_db.py
User=root
StandardOutput=journal
StandardError=journal
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOL
# Reload systemd to recognize new services
systemctl daemon-reload
@@ -286,6 +305,11 @@ systemctl enable nebuleair-wifi-powersave.timer
systemctl start nebuleair-wifi-powersave.timer
echo "Started nebuleair-wifi-powersave timer"
# Enable and start CPU power mode service (runs once at boot)
systemctl enable nebuleair-cpu-power.service
systemctl start nebuleair-cpu-power.service
echo "Started nebuleair-cpu-power service"
echo "Checking status of all timers..."
systemctl list-timers | grep nebuleair