]> granicus.if.org Git - icinga2/commitdiff
Remove bashisms from some of the shell scripts
authorLars Engels <lars.engels@0x20.net>
Fri, 14 Nov 2014 17:28:48 +0000 (18:28 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 2 Dec 2014 08:59:56 +0000 (09:59 +0100)
fixes #7685

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
etc/icinga2/scripts/mail-host-notification.sh
etc/icinga2/scripts/mail-service-notification.sh

index 0ecec0e8233436776a5fd0539d327b29a863a727..e1ac7166486af5992519b0ce19052459a43706aa 100755 (executable)
@@ -1,5 +1,5 @@
-#!/usr/bin/env bash
-template=$(cat <<TEMPLATE
+#!/bin/sh
+template=`cat <<TEMPLATE
 ***** Icinga  *****
 
 Notification Type: $NOTIFICATIONTYPE
@@ -14,7 +14,7 @@ Additional Info: $HOSTOUTPUT
 
 Comment: [$NOTIFICATIONAUTHORNAME] $NOTIFICATIONCOMMENT
 TEMPLATE
-)
+`
 
 /usr/bin/printf "%b" "$template" | mail -s "$NOTIFICATIONTYPE - $HOSTDISPLAYNAME is $HOSTSTATE" $USEREMAIL
 
index 7dfb9560774ad372a6669ddd5194a983ab8d4d8d..8574036b306acf6c20294bd976322c28a249de84 100755 (executable)
@@ -1,5 +1,5 @@
-#!/usr/bin/env bash
-template=$(cat <<TEMPLATE
+#!/bin/sh
+template=`cat <<TEMPLATE
 ***** Icinga  *****
 
 Notification Type: $NOTIFICATIONTYPE
@@ -15,7 +15,7 @@ Additional Info: $SERVICEOUTPUT
 
 Comment: [$NOTIFICATIONAUTHORNAME] $NOTIFICATIONCOMMENT
 TEMPLATE
-)
+`
 
 /usr/bin/printf "%b" "$template" | mail -s "$NOTIFICATIONTYPE - $HOSTDISPLAYNAME - $SERVICEDISPLAYNAME is $SERVICESTATE" $USEREMAIL