File: notify.d.sh

package info (click to toggle)
needrestart 3.11-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 780 kB
  • sloc: perl: 3,552; sh: 394; makefile: 83
file content (35 lines) | stat: -rw-r--r-- 917 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# needrestart - Restart daemons after library updates.
#
# Authors:
#   Thomas Liske <thomas@fiasko-nw.net>
#
# Copyright Holder:
#   2013 - 2025 (C) Thomas Liske <thomas@fiasko-nw.net>
#
# License:
#   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 2 of the License, or
#   (at your option) any later version.
#

# Shell library for scripts in /etc/needrestart/notify.d/

NOTIFYCONF='/etc/needrestart/notify.conf'
GETTEXTLIB='/usr/bin/gettext.sh'
export TEXTDOMAIN='needrestart-notify'

if [ ! -r "$NOTIFYCONF" ]; then
    echo "[$0] Unable to read $NOTIFYCONF - aborting!" 1>&2
    exit 1;
fi

# Load global config
. "$NOTIFYCONF"

# Load gettext shell library
. "$GETTEXTLIB"

# Get LANG of session
LANG=$(sed -z -n s/^LANG=//p "/proc/$NR_SESSPPID/environ")
export LANG