mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2026-08-07 00:18:23 +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
|
|
@ -3,21 +3,11 @@ set -euo pipefail
|
|||
source /usr/local/lib/pivilion/common.sh
|
||||
pivilion_load_config
|
||||
|
||||
mode=$(pivilion_current_mode)
|
||||
torname="not generated yet"
|
||||
[ ! -s "$PIVILION_DIR/torname" ] || torname=$(tr -d '\r\n' < "$PIVILION_DIR/torname")
|
||||
uptime_text=$(uptime -p 2>/dev/null || true)
|
||||
pivilion_print_motd
|
||||
|
||||
cat <<EOF
|
||||
|
||||
Welcome to Pivilion!
|
||||
|
||||
Host...............: $(uname -n)
|
||||
System.............: $(uname -srmo)
|
||||
Uptime.............: ${uptime_text:-unknown}
|
||||
Mode after reboot..: $mode
|
||||
Onion address......: $torname
|
||||
Web root...........: $PIVILION_WEBROOT
|
||||
Web root: $PIVILION_WEBROOT
|
||||
|
||||
Commands:
|
||||
pivilion show this status
|
||||
|
|
@ -28,4 +18,5 @@ Commands:
|
|||
static convert the current gallery to static files
|
||||
hotglue install or restore Hotglue
|
||||
htaccess reset or remove captive redirect rules
|
||||
pivilion-diagnose check captive DNS, HTTP redirects, and services
|
||||
EOF
|
||||
|
|
|
|||
4
usr/local/bin/pivilion-diagnose
Executable file
4
usr/local/bin/pivilion-diagnose
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
[ "$(id -u)" -eq 0 ] || exec sudo "$0" "$@"
|
||||
exec /usr/local/lib/pivilion/mode.sh diagnose
|
||||
Loading…
Add table
Add a link
Reference in a new issue