Skip to content

Commit 1b213b9

Browse files
committed
s/start/restart/
1 parent cd2b8bc commit 1b213b9

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

.github/prepare-sources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mkdir -p ${BUILD_DIR}/etc/systemd/system
77
mkdir -p ${BUILD_DIR}/usr/local/bin
88
mkdir -p ${BUILD_DIR}/etc/udev/rules.d
99
cp powertop.service ${BUILD_DIR}/etc/systemd/system
10-
cp async-start-powertop ${BUILD_DIR}/usr/local/bin
10+
cp async-restart-powertop ${BUILD_DIR}/usr/local/bin
1111
cp async-stop-powertop ${BUILD_DIR}/usr/local/bin
1212
cp power_supply.rules ${BUILD_DIR}/etc/udev/rules.d
1313
mkdir ${BUILD_DIR}/DEBIAN

async-restart-powertop

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
logger -s "Restarting the powertop service"
4+
echo "systemctl restart powertop.service" | at now

async-start-powertop

Lines changed: 0 additions & 4 deletions
This file was deleted.

async-stop-powertop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22

33
logger -s "Stopping the powertop service"
4-
echo "systemctl stop powertop" | at now
4+
echo "systemctl stop powertop.service" | at now

debian/postinst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/usr/bin/env bash
22

3-
set -x
4-
53
chown root:root /etc/systemd/system/powertop.service
64
chown root:root /etc/udev/rules.d/power_supply.rules
7-
chown root:root /usr/local/bin/async-start-powertop
5+
chown root:root /usr/local/bin/async-restart-powertop
86
chown root:root /usr/local/bin/async-stop-powertop
97

108
chmod 644 /etc/systemd/system/powertop.service
119
chmod 644 /etc/udev/rules.d/power_supply.rules
12-
chmod 755 /usr/local/bin/async-start-powertop
10+
chmod 755 /usr/local/bin/async-restart-powertop
1311
chmod 755 /usr/local/bin/async-stop-powertop
12+
13+
systemctl daemon-reload
14+
systemctl enable powertop.service

power_supply.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_STATUS}=="Discharging", RUN+="/usr/local/bin/async-start-powertop"
1+
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_STATUS}=="Discharging", RUN+="/usr/local/bin/async-restart-powertop"
22
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_STATUS}=="Charging", RUN+="/usr/local/bin/async-stop-powertop"

0 commit comments

Comments
 (0)