From 04f990ae5a82beb9906b7f8f2a13a415e1a9c3aa Mon Sep 17 00:00:00 2001 From: Alex Burr Date: Thu, 17 Nov 2016 16:51:13 +0000 Subject: [PATCH] Add dbus config and systemd config, installation and packaging of kano-memory-monitor --- config/dbus/me.kano.monitor.conf | 17 +++++++++++++++++ config/sudoers.d/kano-desktop_conf | 3 +++ debian/install | 5 +++++ systemd/kano-common-monitor.service | 10 ++++++++++ systemd/kano-common.target | 2 +- 5 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 config/dbus/me.kano.monitor.conf create mode 100644 systemd/kano-common-monitor.service diff --git a/config/dbus/me.kano.monitor.conf b/config/dbus/me.kano.monitor.conf new file mode 100644 index 0000000..7fe6861 --- /dev/null +++ b/config/dbus/me.kano.monitor.conf @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + diff --git a/config/sudoers.d/kano-desktop_conf b/config/sudoers.d/kano-desktop_conf index b29e1bb..8ee3525 100644 --- a/config/sudoers.d/kano-desktop_conf +++ b/config/sudoers.d/kano-desktop_conf @@ -13,3 +13,6 @@ Cmnd_Alias KILL_DESKTOP_WIDGETS = /usr/bin/pkill kano-settings, \ # allow user to switch to virtual console terminals %sudo ALL=(root) NOPASSWD: /bin/chvt + +# kano-memory-monitor is run as root to allow pid tracking +%sudo ALL=(root) NOPASSWD: /usr/bin/kano-memory-monitor diff --git a/debian/install b/debian/install index e1da759..0346be1 100644 --- a/debian/install +++ b/debian/install @@ -21,6 +21,8 @@ config/gtk-2.0 etc/skel/.config/ config/dconf etc/skel/.config/ config/console usr/share/kano-desktop/config +config/dbus/me.kano.monitor.conf /etc/dbus-1/system.d/ + config/sudoers.d/* usr/share/kano-desktop/config/sudoers.d config/systemd/kano.conf /lib/systemd/system/user@.service.d @@ -36,6 +38,7 @@ bin/use-the-force usr/bin bin/kano-dashboard-confirm usr/bin bin/make-adventures usr/bin bin/kano-keyboard-hotkeys usr/bin +bin/kano-memory-monitor usr/bin scripts/* usr/share/kano-desktop/scripts @@ -45,3 +48,5 @@ kano-mount-trigger/kano-mount-trigger /usr/bin/ kano-mount-trigger/95-kano-mount-trigger.rules /lib/udev/rules.d/ systemd/* /usr/lib/systemd/user/ + +kano_monitor /usr/lib/python2.7/dist-packages/ diff --git a/systemd/kano-common-monitor.service b/systemd/kano-common-monitor.service new file mode 100644 index 0000000..014b0e7 --- /dev/null +++ b/systemd/kano-common-monitor.service @@ -0,0 +1,10 @@ +# +# kano-common-monitor +# + +[Unit] +Description=Kano Memory Monitor +IgnoreOnIsolate=true + +[Service] +ExecStart=/usr/bin/sudo /usr/bin/kano-memory-monitor diff --git a/systemd/kano-common.target b/systemd/kano-common.target index b27187b..7edd58c 100644 --- a/systemd/kano-common.target +++ b/systemd/kano-common.target @@ -9,4 +9,4 @@ Description=Kano Common User Services IgnoreOnIsolate=true Requires=kano-common-tracker.service kano-common-notifications.service \ kano-common-speakerleds.service kano-common-boards.service \ - kano-common-keyboard.service + kano-common-keyboard.service kano-common-monitor.service