mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Moves creation of pihole user before FTL installation
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com>
This commit is contained in:
parent
3f90261520
commit
efbd42f7b5
@ -1890,9 +1890,6 @@ accountForRefactor() {
|
||||
|
||||
# Install base files and web interface
|
||||
installPihole() {
|
||||
# Create the pihole user
|
||||
create_pihole_user
|
||||
|
||||
# If the user wants to install the Web interface,
|
||||
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
|
||||
if [[ ! -d "${webroot}" ]]; then
|
||||
@ -2591,6 +2588,8 @@ main() {
|
||||
else
|
||||
LIGHTTPD_ENABLED=false
|
||||
fi
|
||||
# Create the pihole user
|
||||
create_pihole_user
|
||||
# Check if FTL is installed - do this early on as FTL is a hard dependency for Pi-hole
|
||||
if ! FTLdetect; then
|
||||
printf " %b FTL Engine not installed\\n" "${CROSS}"
|
||||
|
@ -398,6 +398,7 @@ def test_FTL_detect_aarch64_no_errors(Pihole):
|
||||
)
|
||||
detectPlatform = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
FTLdetect
|
||||
''')
|
||||
expected_stdout = info_box + ' FTL Checks...'
|
||||
@ -418,6 +419,7 @@ def test_FTL_detect_armv6l_no_errors(Pihole):
|
||||
mock_command('ldd', {'/bin/ls': ('/lib/ld-linux-armhf.so.3', '0')}, Pihole)
|
||||
detectPlatform = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
FTLdetect
|
||||
''')
|
||||
expected_stdout = info_box + ' FTL Checks...'
|
||||
@ -439,6 +441,7 @@ def test_FTL_detect_armv7l_no_errors(Pihole):
|
||||
mock_command('ldd', {'/bin/ls': ('/lib/ld-linux-armhf.so.3', '0')}, Pihole)
|
||||
detectPlatform = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
FTLdetect
|
||||
''')
|
||||
expected_stdout = info_box + ' FTL Checks...'
|
||||
@ -455,6 +458,7 @@ def test_FTL_detect_x86_64_no_errors(Pihole):
|
||||
'''
|
||||
detectPlatform = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
FTLdetect
|
||||
''')
|
||||
expected_stdout = info_box + ' FTL Checks...'
|
||||
@ -471,6 +475,7 @@ def test_FTL_detect_unknown_no_errors(Pihole):
|
||||
mock_command('uname', {'-m': ('mips', '0')}, Pihole)
|
||||
detectPlatform = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
FTLdetect
|
||||
''')
|
||||
expected_stdout = 'Not able to detect architecture (unknown: mips)'
|
||||
@ -484,6 +489,7 @@ def test_FTL_download_aarch64_no_errors(Pihole):
|
||||
download_binary = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
binary="pihole-FTL-aarch64-linux-gnu"
|
||||
create_pihole_user
|
||||
FTLinstall
|
||||
''')
|
||||
expected_stdout = tick_box + ' Downloading and Installing FTL'
|
||||
@ -498,6 +504,7 @@ def test_FTL_download_unknown_fails_no_errors(Pihole):
|
||||
download_binary = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
binary="pihole-FTL-mips"
|
||||
create_pihole_user
|
||||
FTLinstall
|
||||
''')
|
||||
expected_stdout = cross_box + ' Downloading and Installing FTL'
|
||||
@ -514,6 +521,7 @@ def test_FTL_download_binary_unset_no_errors(Pihole):
|
||||
'''
|
||||
download_binary = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
FTLinstall
|
||||
''')
|
||||
expected_stdout = cross_box + ' Downloading and Installing FTL'
|
||||
@ -530,6 +538,7 @@ def test_FTL_binary_installed_and_responsive_no_errors(Pihole):
|
||||
'''
|
||||
installed_binary = Pihole.run('''
|
||||
source /opt/pihole/basic-install.sh
|
||||
create_pihole_user
|
||||
FTLdetect
|
||||
pihole-FTL version
|
||||
''')
|
||||
|
Loading…
Reference in New Issue
Block a user