]> Frank Brehm's Git Trees - pixelpark/admin-tools.git/commitdiff
Minor changes
authorFrank Brehm <frank@brehm-online.com>
Fri, 23 Apr 2021 11:09:24 +0000 (13:09 +0200)
committerFrank Brehm <frank@brehm-online.com>
Fri, 23 Apr 2021 11:09:24 +0000 (13:09 +0200)
bin/update-minecraft-server-jar

index c5cb65ca4328c841c98aa3781537c16a868c6b80..cb2fa20e6818475fbdca3e06c905ca5782206167 100755 (executable)
@@ -303,6 +303,7 @@ fix_symlinks() {
         if [[ "${link_target}" != "${canon_path_target_jar}" ]] ; then
             info "Symlink '${CYAN}${MC_SERVER_CUR_LINK_BASE}${NORMAL}' must be corrected."
             LN -sf "${TARGET_JAR}" "${MC_SERVER_CUR_LINK_BASE}"
+            CHOWN -h "${MC_USER}:${MC_GROUP}" "${MC_SERVER_CUR_LINK_BASE}"
             NEED_RESTART='y'
             symlink_was_set="y"
         fi
@@ -311,6 +312,7 @@ fix_symlinks() {
 
         info "Symlink '${CYAN}${MC_SERVER_CUR_LINK_BASE}${NORMAL}' does not exists, will be created."
         LN -sf "${TARGET_JAR}" "${MC_SERVER_CUR_LINK_BASE}"
+        CHOWN -h "${MC_USER}:${MC_GROUP}" "${MC_SERVER_CUR_LINK_BASE}"
         NEED_RESTART='y'
         symlink_was_set="y"
 
@@ -403,7 +405,7 @@ check_and_send_mail() {
     fi
 
     info "Sending mail to <${MAIL_TO_ADDRESS}>"
-    echo "${MAIL_BODY}" | mailx --return-address="${MAIL_RETURN_ADDRESS}" \
+    echo -e "${MAIL_BODY}" | mailx --return-address="${MAIL_RETURN_ADDRESS}" \
         --append="From: ${MAIL_FROM_ADDRESS}" --subject="${subject}" "${MAIL_TO_ADDRESS}"
 
 }