add cpu power mode
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user