mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Merge branch 'master' into new-php-pa
This commit is contained in:
@@ -78,8 +78,7 @@ function install_dependencies() {
|
||||
function enable_php_lighttpd() {
|
||||
install_log "Enabling PHP for lighttpd"
|
||||
|
||||
sudo lighttpd-enable-mod fastcgi-php
|
||||
|
||||
sudo lighttpd-enable-mod fastcgi-php
|
||||
sudo service lighttpd force-reload
|
||||
sudo /etc/init.d/lighttpd restart || install_error "Unable to restart lighttpd"
|
||||
}
|
||||
@@ -101,6 +100,14 @@ function create_raspap_directories() {
|
||||
cat /etc/dhcpcd.conf | sudo tee -a /etc/raspap/networking/defaults
|
||||
|
||||
sudo chown -R $raspap_user:$raspap_user "$raspap_dir" || install_error "Unable to change file ownership for '$raspap_dir'"
|
||||
|
||||
|
||||
}
|
||||
|
||||
# Generate logging enable/disable files for hostapd
|
||||
function create_logging_scripts() {
|
||||
sudo mkdir /etc/raspap/hostapd
|
||||
sudo mv /var/www/html/installers/*log.sh /etc/raspap/hostapd
|
||||
}
|
||||
|
||||
# Generate logging enable/disable files for hostapd
|
||||
@@ -186,7 +193,7 @@ function default_configuration() {
|
||||
'echo 1 > /proc/sys/net/ipv4/ip_forward #RASPAP'
|
||||
'iptables -t nat -A POSTROUTING -j MASQUERADE #RASPAP'
|
||||
)
|
||||
|
||||
|
||||
for line in "${lines[@]}"; do
|
||||
if grep "$line" /etc/rc.local > /dev/null; then
|
||||
echo "$line: Line already added"
|
||||
|
3
installers/disablelog.sh
Executable file
3
installers/disablelog.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
/bin/sed -i 's|DAEMON_OPTS=" -f /tmp/hostapd.log"|#DAEMON_OPTS=""|' /etc/default/hostapd
|
||||
|
2
installers/enablelog.sh
Executable file
2
installers/enablelog.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
/bin/sed -i 's|#DAEMON_OPTS=""|DAEMON_OPTS=" -f /tmp/hostapd.log"|' /etc/default/hostapd
|
@@ -63,10 +63,23 @@ function check_for_backups() {
|
||||
fi
|
||||
if [ -f "$raspap_dir/backups/dhcpcd.conf" ]; then
|
||||
echo -n "Restore the last dhcpcd.conf file? [y/N]: "
|
||||
read answer
|
||||
if [[ $answer -eq 'y' ]]; then
|
||||
sudo cp "$raspap_dir/backups/dhcpcd.conf" /etc/dhcpcd.conf
|
||||
fi
|
||||
fi
|
||||
if [ -f "$raspap_dir/backups/rc.local" ]; then
|
||||
echo -n "Restore the last rc.local file? [y/N]: "
|
||||
read answer
|
||||
if [[ $answer -eq 'y' ]]; then
|
||||
sudo cp "$raspap_dir/backups/rc.local" /etc/rc.local
|
||||
else
|
||||
echo -n "Remove RaspAP Lines from /etc/rc.local? [Y/n]: "
|
||||
if $answer -ne 'n' ]]; then
|
||||
sed -i '/#RASPAP/d' /etc/rc.local
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user