From 8ab5471321af6d116984a0948f430c77c013a691 Mon Sep 17 00:00:00 2001 From: Dave Fallon Date: Mon, 9 Sep 2013 21:38:54 -0700 Subject: [PATCH 1/2] Fixed issue #199 - set permissions properly for /etc/cron.d/msm --- installers/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/common.sh b/installers/common.sh index dee2294..c824da3 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -116,7 +116,7 @@ function install_config() { # Installs msm.cron into /etc/cron.d function install_cron() { install_log "Installing MSM cron file" - sudo install "$dl_dir/msm.cron" /etc/cron.d/msm || install_error "Couldn't install cron file" + sudo install -m0644 "$dl_dir/msm.cron" /etc/cron.d/msm || install_error "Couldn't install cron file" } # Reloads cron service (if necessary) From cb516329209075a90e0cef5cb71a85d815e479c5 Mon Sep 17 00:00:00 2001 From: Dave Fallon Date: Wed, 11 Sep 2013 22:19:24 -0700 Subject: [PATCH 2/2] Removed cron reloading. Looks like modern distros don't require it. --- installers/common.sh | 7 ------- installers/debian.sh | 10 ---------- installers/redhat.sh | 5 ----- 3 files changed, 22 deletions(-) diff --git a/installers/common.sh b/installers/common.sh index c824da3..f1ea060 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -119,12 +119,6 @@ function install_cron() { sudo install -m0644 "$dl_dir/msm.cron" /etc/cron.d/msm || install_error "Couldn't install cron file" } -# Reloads cron service (if necessary) -function reload_cron() { - # OVERLOAD THIS - install_error "No function defined for reload_cron" -} - # Installs init script into /etc/init.d function install_init() { install_log "Installing MSM init file" @@ -160,7 +154,6 @@ function install_msm() { patch_latest_files install_config install_cron - reload_cron install_init enable_init update_msm diff --git a/installers/debian.sh b/installers/debian.sh index aa2cb0d..94db4e1 100755 --- a/installers/debian.sh +++ b/installers/debian.sh @@ -13,16 +13,6 @@ function install_dependencies() { sudo apt-get install screen rsync zip || install_error "Couldn't install dependencies" } -function reload_cron() { - install_log "Reloading cron service" - hash service 2>/dev/null - if [[ $? == 0 ]]; then - sudo service cron reload - else - sudo /etc/init.d/cron reload - fi -} - function enable_init() { install_log "Enabling automatic startup and shutdown" hash insserv 2>/dev/null diff --git a/installers/redhat.sh b/installers/redhat.sh index 17a73ba..ee81dde 100755 --- a/installers/redhat.sh +++ b/installers/redhat.sh @@ -12,11 +12,6 @@ function install_dependencies() { sudo yum install screen rsync zip || install_error "Couldn't install dependencies" } -function reload_cron() { - install_log "Reloading cron service" - sudo service crond reload -} - function enable_init() { install_log "Enabling automatic startup and shutdown" sudo chkconfig --add msm