From 326dc9ea662b1644423ca8edb929dc7b4065b3a3 Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 3 Apr 2020 13:19:57 -0400 Subject: [PATCH] Fix permissions on service scripts --- installJRMC | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/installJRMC b/installJRMC index 97adfce..e827597 100755 --- a/installJRMC +++ b/installJRMC @@ -253,7 +253,7 @@ EOF _install_cmd_nogpg=("${_install_cmd[@]}" "--nogpgcheck") - # append sudo to non-containers and non-root users + # append sudo for non-root users if [[ "$_user" != "root" ]]; then _install_cmd=("sudo" "${_install_cmd[@]}") _install_cmd_nogpg=("sudo" "${_install_cmd_nogpg[@]}") @@ -644,7 +644,7 @@ EOF" "${_firewallcmd[@]}" --permanent --service=jriver --add-port=1900/udp "${_firewallcmd[@]}" --reload fi - + # Ubuntu elif [[ "$ID" == "ubuntu" && -x $(command -v ufw) ]]; then if [[ ! -f "/etc/ufw/applications.d/jriver.service" ]]; then @@ -726,7 +726,7 @@ EOF" _generateServiceVars "jriver-mediaserver" - "${_bash_cmd[@]}" "cat <<-EOF > $_service_fname + bash -c "cat <<-EOF > $_service_fname [Unit] Description=JRiver Media Center $_mversion Media Server After=graphical.target @@ -761,7 +761,7 @@ EOF" _exec_start_cmd="/usr/bin/x11vnc -display $_display -geometry 1920x1080 -rfbauth $HOME/.vnc/jrmc_passwd -auth guess -forever -bg" fi - "${_bash_cmd[@]}" "cat <<-EOF > $_service_fname + bash -c "cat <<-EOF > $_service_fname [Unit] Description=x11vnc After=display-manager.service @@ -785,7 +785,7 @@ EOF" _generateServiceVars "jriver-createrepo" - "${_bash_cmd[@]}" "cat <<-EOF > $_service_fname + bash -c "cat <<-EOF > $_service_fname [Unit] Description=Builds JRiver Media Center RPM file, moves it to the repo dir, and runs createrepo @@ -796,7 +796,7 @@ ExecStart=$_basedir/installJRMC --buildpath=$_outputdir --createrepo --createrep [Install] WantedBy=multi-user.target EOF" - "${_bash_cmd[@]}" "cat <<-EOF > $_timer_fname + bash -c "cat <<-EOF > $_timer_fname [Unit] Description=Run JRiver MC rpmbuild hourly