bottom: add gpu recognition, new apple sdk, refactor (#360568)
[NixPkgs.git] / pkgs / by-name / at / atop / fix-paths.patch
blob0d4b8c9641c390845779c96594dd50d1e54cd664
1 diff --git a/atop-pm.sh b/atop-pm.sh
2 index 3ff4ab5..c433b1a 100755
3 --- a/atop-pm.sh
4 +++ b/atop-pm.sh
5 @@ -1,10 +1,10 @@
6 #!/bin/sh
8 case "$1" in
9 - pre) /usr/bin/systemctl stop atop
10 + pre) @systemd@/bin/systemctl stop atop
11 exit 0
13 - post) /usr/bin/systemctl start atop
14 + post) @systemd@/bin/systemctl start atop
15 exit 0
17 *) exit 1
18 diff --git a/atop-rotate.service b/atop-rotate.service
19 index dbe8e0f..4eaa84d 100644
20 --- a/atop-rotate.service
21 +++ b/atop-rotate.service
22 @@ -4,4 +4,4 @@ Documentation=man:atop(1)
24 [Service]
25 Type=oneshot
26 -ExecStart=/usr/bin/systemctl restart atop.service
27 +ExecStart=@systemd@/bin/systemctl restart atop.service
28 diff --git a/atop.service b/atop.service
29 index 3e5bafd..6b11dea 100644
30 --- a/atop.service
31 +++ b/atop.service
32 @@ -12,8 +12,8 @@ EnvironmentFile=/etc/default/atop
33 ExecStartPre=/bin/sh -c 'test -d "${LOGPATH}" || mkdir -p "${LOGPATH}"'
34 ExecStartPre=/bin/sh -c 'test -n "$LOGINTERVAL" -a "$LOGINTERVAL" -eq "$LOGINTERVAL"'
35 ExecStartPre=/bin/sh -c 'test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS"'
36 -ExecStart=/bin/sh -c 'exec /usr/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}'
37 -ExecStartPost=/usr/bin/find "${LOGPATH}" -name "atop_*" -mtime +${LOGGENERATIONS} -exec rm -v {} \;
38 +ExecStart=/bin/sh -c 'exec @out@/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}'
39 +ExecStartPost=@findutils@/bin/find "${LOGPATH}" -name "atop_*" -mtime +${LOGGENERATIONS} -exec rm -v {} \;
40 KillSignal=SIGUSR2
42 [Install]
43 diff --git a/atopacct.service b/atopacct.service
44 index 3aa529d..b95db43 100644
45 --- a/atopacct.service
46 +++ b/atopacct.service
47 @@ -7,7 +7,7 @@ Before=atop.service
48 Type=forking
49 PIDFile=/run/atopacctd.pid
50 ExecStartPre=/bin/sh -c 'if systemctl -q is-active acct psacct; then echo "Process accounting already in use by (ps)acct"; exit 1; fi'
51 -ExecStart=/usr/sbin/atopacctd
52 +ExecStart=@out@/bin/atopacctd
54 [Install]
55 WantedBy=multi-user.target
56 diff --git a/atopgpu.service b/atopgpu.service
57 index 4839235..8aae1c5 100644
58 --- a/atopgpu.service
59 +++ b/atopgpu.service
60 @@ -4,7 +4,7 @@ Documentation=man:atopgpud(8)
61 Before=atop.service
63 [Service]
64 -ExecStart=/usr/sbin/atopgpud
65 +ExecStart=@out@/bin/atopgpud
66 Type=oneshot
67 RemainAfterExit=yes