Wip install scripts
This commit is contained in:
@@ -24,7 +24,7 @@ makedepends="
|
|||||||
libnftnl-dev
|
libnftnl-dev
|
||||||
"
|
"
|
||||||
checkdepends=""
|
checkdepends=""
|
||||||
install="$pkgname.post-install $pkgname.pre-upgrade $pkgname.post-upgrade $pkgname.pre-deinstall $pkgname.post-deinstall"
|
install="$pkgname-systemd.post-install $pkgname.pre-upgrade $pkgname-systemd.post-upgrade $pkgname.pre-deinstall $pkgname.post-deinstall"
|
||||||
subpackages="$pkgname-systemd"
|
subpackages="$pkgname-systemd"
|
||||||
source=""
|
source=""
|
||||||
builddir="$srcdir/"
|
builddir="$srcdir/"
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
echo "mullvad post-install"
|
echo "mullvad-systemd post-install"
|
||||||
|
# Are we running systemd?
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||||
if systemctl status mullvad-daemon &> /dev/null; then
|
# Does `mullvad-daemon.service` exist?
|
||||||
|
if systemctl list-unit-files mullvad-daemon.service &> /dev/null; then
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||||
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
echo "mullvad post-upgrade"
|
echo "mullvad-systemd post-upgrade"
|
||||||
|
# Are we running systemd?
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||||
if systemctl status mullvad-daemon &> /dev/null; then
|
# Does `mullvad-daemon.service` exist?
|
||||||
|
if systemctl list-unit-files mullvad-daemon.service &> /dev/null; then
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||||
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||||
@@ -2,7 +2,9 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
echo "mullvad pre-upgrade"
|
echo "mullvad pre-upgrade"
|
||||||
|
# Are we running systemd?
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||||
|
# Is `mullvad-daemon.service` running?
|
||||||
if systemctl status mullvad-daemon &> /dev/null; then
|
if systemctl status mullvad-daemon &> /dev/null; then
|
||||||
mullvad-setup prepare-restart || true
|
mullvad-setup prepare-restart || true
|
||||||
systemctl stop mullvad-daemon.service
|
systemctl stop mullvad-daemon.service
|
||||||
|
|||||||
Reference in New Issue
Block a user