mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Fix line break to Unix
This commit is contained in:
parent
a34485225f
commit
fd487a9824
@ -26,7 +26,7 @@ readonly raspap_adblock="/etc/dnsmasq.d/090_adblock.conf"
|
|||||||
readonly raspap_sysctl="/etc/sysctl.d/90_raspap.conf"
|
readonly raspap_sysctl="/etc/sysctl.d/90_raspap.conf"
|
||||||
readonly raspap_network="$raspap_dir/networking/"
|
readonly raspap_network="$raspap_dir/networking/"
|
||||||
readonly rulesv4="/etc/iptables/rules.v4"
|
readonly rulesv4="/etc/iptables/rules.v4"
|
||||||
readonly raspap_client_scripts="/usr/local/sbin"
|
# readonly raspap_client_scripts="/usr/local/sbin"
|
||||||
readonly notracking_url="https://raw.githubusercontent.com/notracking/hosts-blocklists/master/"
|
readonly notracking_url="https://raw.githubusercontent.com/notracking/hosts-blocklists/master/"
|
||||||
webroot_dir="/var/www/html"
|
webroot_dir="/var/www/html"
|
||||||
git_source_url="https://github.com/$repo" # $repo from install.raspap.com
|
git_source_url="https://github.com/$repo" # $repo from install.raspap.com
|
||||||
@ -51,7 +51,7 @@ function _install_raspap() {
|
|||||||
_configure_networking
|
_configure_networking
|
||||||
_prompt_install_adblock
|
_prompt_install_adblock
|
||||||
_prompt_install_openvpn
|
_prompt_install_openvpn
|
||||||
_install_features
|
_install_features
|
||||||
_patch_system_files
|
_patch_system_files
|
||||||
_install_complete
|
_install_complete
|
||||||
}
|
}
|
||||||
@ -63,10 +63,10 @@ function _install_features() {
|
|||||||
f=$(basename $feature)
|
f=$(basename $feature)
|
||||||
func="_${f%.*}"
|
func="_${f%.*}"
|
||||||
if declare -f -F $func > /dev/null; then
|
if declare -f -F $func > /dev/null; then
|
||||||
_install_log "Installing $func"
|
_install_log "Installing $func"
|
||||||
$func || _install_status 1 "Not able to install feature ($func)"
|
$func || _install_status 1 "Not able to install feature ($func)"
|
||||||
else
|
else
|
||||||
_install_status 1 "Install file $f is missing install function $func"
|
_install_status 1 "Install file $f is missing install function $func"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,40 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# RaspAP feature installation: handling of mobile data clients and client configuration
|
# RaspAP feature installation: handling of mobile data clients and client configuration
|
||||||
# to be sources by the RaspAP installer script
|
# to be sources by the RaspAP installer script
|
||||||
# Author: @zbchristian <christian@zeitnitz.eu>
|
# Author: @zbchristian <christian@zeitnitz.eu>
|
||||||
# Author URI: https://github.com/zbchristian/
|
# Author URI: https://github.com/zbchristian/
|
||||||
# License: GNU General Public License v3.0
|
# License: GNU General Public License v3.0
|
||||||
# License URI: https://github.com/raspap/raspap-webgui/blob/master/LICENSE
|
# License URI: https://github.com/raspap/raspap-webgui/blob/master/LICENSE
|
||||||
|
|
||||||
# path for mobile modem scripts
|
# path for mobile modem scripts
|
||||||
readonly raspap_clients_scripts="/usr/local/sbin"
|
readonly raspap_clients_scripts="/usr/local/sbin"
|
||||||
#
|
#
|
||||||
# table of mobile network operators - links the 5 digit operator code (from the modem) with a clear text operator name
|
# table of mobile network operators - links the 5 digit operator code (from the modem) with a clear text operator name
|
||||||
readonly raspap_clients_operator_table="https://raw.githubusercontent.com/musalbas/mcc-mnc-table/master/mcc-mnc-table.csv"
|
readonly raspap_clients_operator_table="https://raw.githubusercontent.com/musalbas/mcc-mnc-table/master/mcc-mnc-table.csv"
|
||||||
|
|
||||||
function _install_feature_clients() {
|
function _install_feature_clients() {
|
||||||
name="feature clients"
|
name="feature clients"
|
||||||
|
|
||||||
_install_log "Install $name"
|
_install_log "Install $name"
|
||||||
|
|
||||||
_install_log " - required packages for mobile data clients"
|
_install_log " - required packages for mobile data clients"
|
||||||
sudo apt-get install wvdial socat bc || _install_status 1 "Unable to install dependencies for $name"
|
sudo apt-get install wvdial socat bc || _install_status 1 "Unable to install dependencies for $name"
|
||||||
|
|
||||||
_install_log " - copy configuration files and scripts"
|
_install_log " - copy configuration files and scripts"
|
||||||
# Move scripts
|
# Move scripts
|
||||||
sudo cp "$webroot_dir/config/client_config/"*.sh "$raspap_clients_scripts/" || _install_status 1 "Unable to move client scripts ($name)"
|
sudo cp "$webroot_dir/config/client_config/"*.sh "$raspap_clients_scripts/" || _install_status 1 "Unable to move client scripts ($name)"
|
||||||
sudo chmod a+rx "$raspap_clients_scripts/"*.sh || _install_status 1 "Unable to chmod client scripts ($name)"
|
sudo chmod a+rx "$raspap_clients_scripts/"*.sh || _install_status 1 "Unable to chmod client scripts ($name)"
|
||||||
# wget $raspap_clients_operator_table -o "$raspap_clients_scripts/"mcc-mnc-table.csv || _install_status 1 "Unable to wget operator table ($name)"
|
# wget $raspap_clients_operator_table -o "$raspap_clients_scripts/"mcc-mnc-table.csv || _install_status 1 "Unable to wget operator table ($name)"
|
||||||
sudo cp "$webroot_dir/config/client_config/mcc-mnc-table.csv" "$raspap_clients_scripts/" || _install_status 1 "Unable to move client data ($name)"
|
sudo cp "$webroot_dir/config/client_config/mcc-mnc-table.csv" "$raspap_clients_scripts/" || _install_status 1 "Unable to move client data ($name)"
|
||||||
# wvdial settings
|
# wvdial settings
|
||||||
sudo cp "$webroot_dir/config/client_config/wvdial.conf" "/etc/" || _install_status 1 "Unable to install client configuration ($name)"
|
sudo cp "$webroot_dir/config/client_config/wvdial.conf" "/etc/" || _install_status 1 "Unable to install client configuration ($name)"
|
||||||
sudo cp "$webroot_dir/config/client_config/interfaces" "/etc/network/interfaces" || _install_status 1 "Unable to install interface settings ($name)"
|
sudo cp "$webroot_dir/config/client_config/interfaces" "/etc/network/interfaces" || _install_status 1 "Unable to install interface settings ($name)"
|
||||||
# udev rules/services to auto start mobile data services
|
# udev rules/services to auto start mobile data services
|
||||||
sudo cp "$webroot_dir/config/client_config/70-mobile-data-sticks.rules" "/etc/udev/rules.d/" || _install_status 1 "Unable to install client udev rules ($name)"
|
sudo cp "$webroot_dir/config/client_config/70-mobile-data-sticks.rules" "/etc/udev/rules.d/" || _install_status 1 "Unable to install client udev rules ($name)"
|
||||||
sudo cp "$webroot_dir/config/client_config/80-raspap-net-devices.rules" "/etc/udev/rules.d/" || _install_status 1 "Unable to install client udev rules ($name)"
|
sudo cp "$webroot_dir/config/client_config/80-raspap-net-devices.rules" "/etc/udev/rules.d/" || _install_status 1 "Unable to install client udev rules ($name)"
|
||||||
sudo cp "$webroot_dir/config/client_config/"*.service "/etc/systemd/system/" || _install_status 1 "Unable to install client startup services ($name)"
|
sudo cp "$webroot_dir/config/client_config/"*.service "/etc/systemd/system/" || _install_status 1 "Unable to install client startup services ($name)"
|
||||||
# client configuration and udev rule templates
|
# client configuration and udev rule templates
|
||||||
sudo cp "$webroot_dir/config/client_udev_prototypes.json" "/etc/raspap/networking/" || _install_status 1 "Unable to install client configuration ($name)"
|
sudo cp "$webroot_dir/config/client_udev_prototypes.json" "/etc/raspap/networking/" || _install_status 1 "Unable to install client configuration ($name)"
|
||||||
_install_status 0
|
_install_status 0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user