Skip to content

Commit

Permalink
rename to verify_file_chmod_chown
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Nov 15, 2023
1 parent 1fabb92 commit b517ec2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion installation/includes/02_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ check_os_type() {
##### Test helpers

# Check if the file(s) has/have the expected owner and modifications
verify_chmod_chown() {
verify_file_chmod_chown() {
local mod_expected=$1
local user_expected=$2
local group_expected=$3
Expand Down
8 changes: 4 additions & 4 deletions installation/routines/setup_jukebox_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ _jukebox_core_check () {
espeak ffmpeg mpg123 \
pulseaudio pulseaudio-module-bluetooth pulseaudio-utils caps \

verify_chmod_chown 755 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${JUKEBOX_PULSE_CONFIG}"
verify_file_chmod_chown 755 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${JUKEBOX_PULSE_CONFIG}"

local pip_modules=$(get_args_from_file "${INSTALLATION_PATH}/requirements.txt")
verify_pip_modules pyzmq $pip_modules

verify_chmod_chown 644 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${SETTINGS_PATH}/jukebox.yaml"
verify_chmod_chown 644 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${SETTINGS_PATH}/logger.yaml"
verify_file_chmod_chown 644 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${SETTINGS_PATH}/jukebox.yaml"
verify_file_chmod_chown 644 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${SETTINGS_PATH}/logger.yaml"

verify_chmod_chown 644 root root "${SYSTEMD_USR_PATH}/jukebox-daemon.service"
verify_file_chmod_chown 644 root root "${SYSTEMD_USR_PATH}/jukebox-daemon.service"

check_service_enablement --user jukebox-daemon.service enabled
}
Expand Down
2 changes: 1 addition & 1 deletion installation/routines/setup_mpd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ _mpd_check () {
echo "Check MPD Installation" | tee /dev/fd/3
verify_apt_packages mpd mpc

verify_chmod_chown 755 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${MPD_CONF_PATH}"
verify_file_chmod_chown 755 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${MPD_CONF_PATH}"

verify_file_contains_string "${AUDIOFOLDERS_PATH}" "${MPD_CONF_PATH}"
verify_file_contains_string "${PLAYLISTS_PATH}" "${MPD_CONF_PATH}"
Expand Down
2 changes: 1 addition & 1 deletion installation/routines/setup_samba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ _samba_check () {
echo "Check Samba Installation" | tee /dev/fd/3
verify_apt_packages samba samba-common-bin

verify_chmod_chown 644 root root "${SMB_CONF}"
verify_file_chmod_chown 644 root root "${SMB_CONF}"

verify_file_contains_string "${SMB_CONF_HEADER}" "${SMB_CONF}"
verify_file_contains_string "${SHARED_PATH}" "${SMB_CONF}"
Expand Down

0 comments on commit b517ec2

Please sign in to comment.