mirror of
https://github.com/unraid/webgui.git
synced 2026-04-24 02:58:57 -05:00
Added GUI access mode - allows changes in access mode from GUI itself
See Tools - WebGUI
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# usage: accessmode [-r] [-p http [,https]]
|
||||
|
||||
[[ -n $1 ]] && options="$1" || options=
|
||||
[[ -n $2 ]] && options="$1 $2"
|
||||
[[ -n $options ]] && options="$options \&" || options="\&"
|
||||
sed -ri "s|^(.*/usr/local/sbin/emhttp).*|\1 $options|" /boot/config/go
|
||||
|
||||
# We need to restart the GUI in a separate process to prevent it from hanging
|
||||
at -M -f /usr/local/emhttp/webGui/scripts/restart_gui now 2>/dev/null
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# read go file settings and restart GUI
|
||||
# called from accessmode script
|
||||
|
||||
/usr/local/sbin/emhttp stop >/dev/null
|
||||
/usr/local/sbin/emhttp $(grep -Po '^.*/usr/local/sbin/emhttp \K[^&]*' /boot/config/go) >/dev/null
|
||||
/etc/rc.d/rc.php-fpm start >/dev/null
|
||||
/etc/rc.d/rc.nginx start >/dev/null
|
||||
Reference in New Issue
Block a user