summaryrefslogtreecommitdiffstats
path: root/systemd/pacman-offline-reboot.service
blob: 26dca94519ddb088a3829c3b3daeca90d913da90 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# (C) 2017-2024 by Christian Hesse <mail@eworm.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

[Unit]
Description=Reboot for pacman offline system-update
ConditionPathExists=/system-update

[Service]
Type=oneshot
ExecStart=/bin/sh -c "if systemctl --dry-run soft-reboot 2>/dev/null; then systemctl soft-reboot; else systemctl reboot; fi"