mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 22:26:42 +00:00
kodi: refresh environment vars when installing/uninstalling addons
This commit is contained in:
parent
6a25a1d40e
commit
0758710223
@ -0,0 +1,36 @@
|
|||||||
|
From 8c8803dc15ea7820f0f980bc12fcea2c7b8c4487 Mon Sep 17 00:00:00 2001
|
||||||
|
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||||
|
Date: Tue, 17 Dec 2019 15:51:23 +0000
|
||||||
|
Subject: [PATCH] refresh /etc/environment on install and uninstall
|
||||||
|
|
||||||
|
---
|
||||||
|
xbmc/addons/Addon.cpp | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/xbmc/addons/Addon.cpp b/xbmc/addons/Addon.cpp
|
||||||
|
index 8a4bd0b..1046ab4 100644
|
||||||
|
--- a/xbmc/addons/Addon.cpp
|
||||||
|
+++ b/xbmc/addons/Addon.cpp
|
||||||
|
@@ -443,6 +443,9 @@ void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
|
||||||
|
// OE
|
||||||
|
|
||||||
|
addon->OnPostInstall(update, modal);
|
||||||
|
+
|
||||||
|
+ if (addon->Type() == ADDON_SERVICE || addon->Type() == ADDON_SCRIPT)
|
||||||
|
+ system("/usr/bin/environment-setup");
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnPreUnInstall(const AddonPtr& addon)
|
||||||
|
@@ -455,6 +458,9 @@ void OnPreUnInstall(const AddonPtr& addon)
|
||||||
|
void OnPostUnInstall(const AddonPtr& addon)
|
||||||
|
{
|
||||||
|
addon->OnPostUnInstall();
|
||||||
|
+
|
||||||
|
+ if (addon->Type() == ADDON_SERVICE || addon->Type() == ADDON_SCRIPT)
|
||||||
|
+ system("/usr/bin/environment-setup");
|
||||||
|
}
|
||||||
|
|
||||||
|
} /* namespace ADDON */
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user