|
|
@ -105,6 +105,13 @@ function create_raspap_directories() {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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/rasp/hostapd
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Fetches latest files from github to webroot
|
|
|
|
# Fetches latest files from github to webroot
|
|
|
|
function download_latest_files() {
|
|
|
|
function download_latest_files() {
|
|
|
|
if [ -d "$webroot_dir" ]; then
|
|
|
|
if [ -d "$webroot_dir" ]; then
|
|
|
@ -194,6 +201,7 @@ function default_configuration() {
|
|
|
|
done
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add a single entry to the sudoers file
|
|
|
|
# Add a single entry to the sudoers file
|
|
|
|
function sudo_add() {
|
|
|
|
function sudo_add() {
|
|
|
|
sudo bash -c "echo \"www-data ALL=(ALL) NOPASSWD:$1\" | (EDITOR=\"tee -a\" visudo)" \
|
|
|
|
sudo bash -c "echo \"www-data ALL=(ALL) NOPASSWD:$1\" | (EDITOR=\"tee -a\" visudo)" \
|
|
|
@ -223,6 +231,8 @@ function patch_system_files() {
|
|
|
|
'/sbin/ip link set wlan0 up'
|
|
|
|
'/sbin/ip link set wlan0 up'
|
|
|
|
'/sbin/ip -s a f label wlan0'
|
|
|
|
'/sbin/ip -s a f label wlan0'
|
|
|
|
'/bin/cp /etc/raspap/networking/dhcpcd.conf /etc/dhcpcd.conf'
|
|
|
|
'/bin/cp /etc/raspap/networking/dhcpcd.conf /etc/dhcpcd.conf'
|
|
|
|
|
|
|
|
'/etc/raspap/hostapd/enablelog.sh'
|
|
|
|
|
|
|
|
'/etc/raspap/hostapd/disablelog.sh'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Check if sudoers needs patchin
|
|
|
|
# Check if sudoers needs patchin
|
|
|
@ -259,6 +269,7 @@ function install_raspap() {
|
|
|
|
install_dependencies
|
|
|
|
install_dependencies
|
|
|
|
enable_php_lighttpd
|
|
|
|
enable_php_lighttpd
|
|
|
|
create_raspap_directories
|
|
|
|
create_raspap_directories
|
|
|
|
|
|
|
|
create_logging_scripts
|
|
|
|
check_for_old_configs
|
|
|
|
check_for_old_configs
|
|
|
|
download_latest_files
|
|
|
|
download_latest_files
|
|
|
|
change_file_ownership
|
|
|
|
change_file_ownership
|
|
|
|