-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up systemd unit disable logic (#721)
* Fix #638
- Loading branch information
Showing
13 changed files
with
57 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ timestamp=2023-08-27T02:39:10Z | |
maintainer="raisjn <[email protected]>" | ||
license=MIT | ||
url="https://github.com/ddvk/remarkable2-framebuffer" | ||
pkgver=1:0.0.32-1 | ||
pkgver=1:0.0.32-2 | ||
_release="${pkgver%-*}" | ||
_release="v${_release#*:}" | ||
_libver=1.0.1 | ||
|
@@ -66,13 +66,13 @@ display() { | |
systemctl daemon-reload | ||
if systemctl enable rm2fb --now; then | ||
# Restart xochitl if it's running | ||
if systemctl --quiet is-active xochitl; then | ||
if is-active xochitl; then | ||
# Reset the crash count so we don't trigger remarkable-fail | ||
echo "0" > /tmp/crashnum | ||
systemctl restart xochitl | ||
fi | ||
else | ||
systemctl disable rm2fb --now | ||
disable-unit rm2fb.service | ||
echo "Failed to start rm2fb. Keeping it disabled for now." | ||
echo "Please check the logs and open an issue:" | ||
echo " https://github.com/toltec-dev/toltec/issues/new" | ||
|
@@ -83,9 +83,7 @@ display() { | |
|
||
preremove() { | ||
if [[ $arch = rm2 ]]; then | ||
if systemctl list-units --full -all | grep -Fq 'rm2fb.service'; then | ||
systemctl disable rm2fb --now | ||
fi | ||
disable-unit rm2fb.service | ||
echo -n "make sure " | ||
if ! is-enabled xochitl.service; then | ||
echo "to re-enable xochitl with 'systemctl enable xochitl --now'" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
pkgnames=(draft) | ||
pkgdesc="Launcher which wraps around the standard interface" | ||
url=https://github.com/dixonary/draft-reMarkable | ||
pkgver=0.2.0-21 | ||
pkgver=0.2.0-22 | ||
timestamp=2020-07-20T10:23Z | ||
section="launchers" | ||
maintainer="Mattéo Delabre <[email protected]>" | ||
|
@@ -60,10 +60,7 @@ configure() { | |
} | ||
|
||
preremove() { | ||
if systemctl list-units --full -all | grep -Fq "$pkgname.service"; then | ||
echo "Disabling $pkgname" | ||
systemctl disable --now "$pkgname" | ||
fi | ||
disable-unit "$pkgname.service" | ||
} | ||
|
||
postremove() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
pkgnames=(koreader) | ||
pkgdesc="Ebook reader supporting PDF, DjVu, EPUB, FB2 and many more formats" | ||
url=https://github.com/koreader/koreader | ||
pkgver=2023.10-1 | ||
pkgver=2023.10-2 | ||
timestamp=2023-10-30T17:19:28Z | ||
section="readers" | ||
maintainer="raisjn <[email protected]>" | ||
|
@@ -62,15 +62,7 @@ MSG | |
} | ||
|
||
preremove() { | ||
if is-active "$pkgname"; then | ||
echo "Stopping $pkgname" | ||
systemctl stop "$pkgname" | ||
fi | ||
|
||
if is-enabled "$pkgname"; then | ||
echo "Disabling $pkgname" | ||
systemctl disable "$pkgname" | ||
fi | ||
disable-unit "$pkgname.service" | ||
} | ||
|
||
postremove() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety oxide-utils inject_evdev liboxide libsentry) | ||
_oxidever=2.6 | ||
pkgver=$_oxidever-2 | ||
pkgver=$_oxidever-3 | ||
_sentryver=0.5.0 | ||
timestamp=2023-06-05T23:27:53Z | ||
maintainer="Eeems <[email protected]>" | ||
|
@@ -98,14 +98,7 @@ tarnish() { | |
fi | ||
} | ||
preremove() { | ||
if is-active tarnish; then | ||
echo "Stopping tarnish" | ||
systemctl stop tarnish | ||
fi | ||
if is-enabled tarnish; then | ||
echo "Disabling tarnish" | ||
systemctl disable tarnish | ||
fi | ||
disable-unit tarnish.service | ||
} | ||
postremove() { | ||
systemctl daemon-reload | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
pkgnames=(reboot-guard) | ||
pkgdesc="Block systemd-initiated poweroff/reboot/halt until configurable condition checks pass" | ||
url=https://github.com/stephanritscher/reboot-guard | ||
pkgver=1.0.1-7 | ||
pkgver=1.0.1-8 | ||
timestamp=2020-05-04T06:16Z | ||
section="devel" | ||
maintainer="Eeems <[email protected]>" | ||
|
@@ -34,14 +34,7 @@ configure() { | |
} | ||
|
||
preremove() { | ||
if is-active rguard.service; then | ||
echo "Stopping rguard.service" | ||
systemctl stop rguard.service | ||
fi | ||
if is-enabled rguard.service; then | ||
echo "Disabling rguard.service" | ||
systemctl disable rguard.service | ||
fi | ||
disable-unit rguard.service | ||
} | ||
|
||
postremove() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ pkgdesc="Connect Xochitl to a rmfakecloud server" | |
_url=https://github.com/ddvk/rmfakecloud-proxy | ||
url="$_url" | ||
_upver=0.0.3 | ||
pkgver="$_upver-3" | ||
pkgver="$_upver-4" | ||
timestamp=2022-02-26T22:59Z | ||
section="utils" | ||
maintainer="Mattéo Delabre <[email protected]>" | ||
|
@@ -55,7 +55,7 @@ configure() { | |
install-hosts | ||
else | ||
uninstall-certificates | ||
systemctl disable --now rmfakecloud-proxy | ||
disable-unit rmfakecloud-proxy.service | ||
uninstall-hosts | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
pkgnames=(tailscale-systemd) | ||
pkgdesc="SystemD configuration for tailscale" | ||
url=https://tailscale.com | ||
pkgver=0.0.0-1 | ||
pkgver=0.0.0-2 | ||
section="utils" | ||
timestamp=2023-07-12T00:00Z | ||
maintainer="Kai <[email protected]>" | ||
|
@@ -30,15 +30,7 @@ configure() { | |
} | ||
|
||
preremove() { | ||
if is-active tailscaled; then | ||
echo "Stopping tailscaled" | ||
systemctl stop tailscaled | ||
fi | ||
|
||
if is-enabled tailscaled; then | ||
echo "Disabling tailscaled" | ||
systemctl disable tailscaled | ||
fi | ||
disable-unit "tailscaled.service" | ||
} | ||
|
||
postremove() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ archs=(rm1 rm2) | |
pkgnames=(toltec-base) | ||
pkgdesc="Metapackage defining the base set of packages in a Toltec install" | ||
url=https://toltec-dev.org/ | ||
pkgver=1.2-2 | ||
pkgver=1.2-3 | ||
timestamp=2023-05-08T19:31Z | ||
section="utils" | ||
maintainer="Eeems <[email protected]>" | ||
|
@@ -29,10 +29,8 @@ configure() { | |
sed -i \ | ||
-e 's|^export TERM=xterm|if \[ -z "$TERM" \];then export TERM=xterm;fi|' \ | ||
/opt/etc/profile | ||
if is-enabled "update-engine.service"; then | ||
echo "Disabling automatic update" | ||
systemctl disable --now update-engine | ||
fi | ||
echo "Disabling automatic update" | ||
disable-unit update-engine.service | ||
if [[ "$arch" == "rm1" ]] && ! is-masked sys-subsystem-net-devices-usb1.device; then | ||
echo "Disabling usb1 network device to avoid long boots" | ||
systemctl mask sys-subsystem-net-devices-usb1.device | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ _pkgname='webinterface-onboot' | |
pkgnames=("$_pkgname") | ||
pkgdesc="Start the web interface without the cable, on boot." | ||
url="https://github.com/rM-self-serve/$_pkgname" | ||
pkgver=1.2.2-1 | ||
pkgver=1.2.2-2 | ||
timestamp=2023-12-03T11:43:00Z | ||
section="utils" | ||
maintainer="rM-self-serve <[email protected]>" | ||
|
@@ -73,14 +73,7 @@ _restore() { | |
} | ||
|
||
preremove() { | ||
if is-active "$pkgname"; then | ||
echo "Stopping $pkgname" | ||
systemctl stop "$pkgname" | ||
fi | ||
if is-enabled "$pkgname"; then | ||
echo "Disabling $pkgname" | ||
systemctl disable "$pkgname" | ||
fi | ||
disable-unit "$pkgname.service" | ||
_restore | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ _pkgname="webinterface-wifi" | |
pkgnames=("$_pkgname") | ||
pkgdesc="View the web interface if running, over wifi" | ||
url="https://github.com/rM-self-serve/$_pkgname" | ||
pkgver=2.0.0-1 | ||
pkgver=2.0.0-2 | ||
timestamp=2023-11-26T00:02:11Z | ||
section="utils" | ||
maintainer="rM-self-serve <[email protected]>" | ||
|
@@ -72,14 +72,7 @@ configure() { | |
} | ||
|
||
preremove() { | ||
if is-active "$pkgname"; then | ||
echo "Stopping $pkgname" | ||
systemctl stop "$pkgname" | ||
fi | ||
if is-enabled "$pkgname"; then | ||
echo "Disabling $pkgname" | ||
systemctl disable "$pkgname" | ||
fi | ||
disable-unit "$pkgname.service" | ||
} | ||
|
||
postremove() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
pkgnames=(xochitl) | ||
pkgdesc="Read documents and take notes" | ||
url=https://remarkable.com | ||
pkgver=0.0.0-16 | ||
pkgver=0.0.0-17 | ||
timestamp=2022-11-07T20:19:57Z | ||
section="readers" | ||
maintainer="Mattéo Delabre <[email protected]>" | ||
|
@@ -83,9 +83,7 @@ configure() { | |
} | ||
|
||
preremove() { | ||
if is-active manual-sync.service; then | ||
systemctl disable --now manual-sync.service | ||
fi | ||
disable-unit manual-sync.service | ||
} | ||
|
||
postremove() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters