mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2026-08-06 16:08:22 +00:00
Fix captive portal detection and restore MOTD
This commit is contained in:
parent
3b7a16564b
commit
34b4c4b036
9 changed files with 153 additions and 59 deletions
12
etc/profile.d/pivilion-motd.sh
Normal file
12
etc/profile.d/pivilion-motd.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Show the Pivilion status banner for the configured owner on interactive Bash
|
||||
# login shells. Other users and non-interactive sessions remain unchanged.
|
||||
[ -n "${BASH_VERSION:-}" ] || return 0
|
||||
case $- in *i*) ;; *) return 0 ;; esac
|
||||
[ -r /usr/local/lib/pivilion/common.sh ] || return 0
|
||||
[ "${PIVILION_MOTD_SHOWN:-0}" != 1 ] || return 0
|
||||
|
||||
. /usr/local/lib/pivilion/common.sh
|
||||
pivilion_load_config >/dev/null 2>&1 || return 0
|
||||
[ "$(id -un)" = "$PIVILION_USER" ] || return 0
|
||||
pivilion_print_motd
|
||||
export PIVILION_MOTD_SHOWN=1
|
||||
Loading…
Add table
Add a link
Reference in a new issue