mirror of
https://github.com/akuker/RASCSI.git
synced 2026-04-26 06:18:10 +00:00
Get and set pretty hostname to use as system name in Web UI (#997)
- Display the pretty hostname as system name in header - Move IP and hostname down to the footer - New endpoint for setting the pretty hostname, plus form field in the Web UI - (unrelated) Use platform.uname() instead of shell uname - (unrelated) Better logic for fetching the Mac HD Drivers zip file in easyinstall.sh
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
TMP_FILE="/tmp/hostnamectl_pretty.tmp"
|
||||
|
||||
if [[ "$1" == "set-hostname" && "$2" == "--pretty" ]]; then
|
||||
if [[ -z "$3" ]]; then
|
||||
rm "$TMP_FILE" 2>/dev/null || true
|
||||
else
|
||||
echo "$3" > $TMP_FILE
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$1" == "status" ]]; then
|
||||
cat "$TMP_FILE" 2>/dev/null
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Mock does not recognize: $0 $@"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user