From c6491d277cc35b0c0cb0855b70d2239ff491e886 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 10 Feb 2018 21:32:36 +0100 Subject: [PATCH] - skel-root: allow options to service calls --- skel-root/armbox/hd51/sbin/service | 6 ++++-- skel-root/coolstream/hd1/sbin/service | 6 ++++-- skel-root/coolstream/hd2/sbin/service | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/skel-root/armbox/hd51/sbin/service b/skel-root/armbox/hd51/sbin/service index 91d290e1..6479274f 100755 --- a/skel-root/armbox/hd51/sbin/service +++ b/skel-root/armbox/hd51/sbin/service @@ -4,6 +4,8 @@ SERVICE="$1" ACTION="$2" +shift 2 +OPTIONS="$*" usage() { echo "usage: service " @@ -17,8 +19,8 @@ test -z "$ACTION" && usage; for i in /etc/init.d/$SERVICE /var/etc/init.d/$SERVICE; do if [ -x "$i" ]; then - LOGINFO "running $i $ACTION" - "$i" "$ACTION" + LOGINFO "running $i $ACTION $OPTIONS" + "$i" "$ACTION" "$OPTIONS" exit $? fi done diff --git a/skel-root/coolstream/hd1/sbin/service b/skel-root/coolstream/hd1/sbin/service index 91d290e1..6479274f 100755 --- a/skel-root/coolstream/hd1/sbin/service +++ b/skel-root/coolstream/hd1/sbin/service @@ -4,6 +4,8 @@ SERVICE="$1" ACTION="$2" +shift 2 +OPTIONS="$*" usage() { echo "usage: service " @@ -17,8 +19,8 @@ test -z "$ACTION" && usage; for i in /etc/init.d/$SERVICE /var/etc/init.d/$SERVICE; do if [ -x "$i" ]; then - LOGINFO "running $i $ACTION" - "$i" "$ACTION" + LOGINFO "running $i $ACTION $OPTIONS" + "$i" "$ACTION" "$OPTIONS" exit $? fi done diff --git a/skel-root/coolstream/hd2/sbin/service b/skel-root/coolstream/hd2/sbin/service index 91d290e1..6479274f 100755 --- a/skel-root/coolstream/hd2/sbin/service +++ b/skel-root/coolstream/hd2/sbin/service @@ -4,6 +4,8 @@ SERVICE="$1" ACTION="$2" +shift 2 +OPTIONS="$*" usage() { echo "usage: service " @@ -17,8 +19,8 @@ test -z "$ACTION" && usage; for i in /etc/init.d/$SERVICE /var/etc/init.d/$SERVICE; do if [ -x "$i" ]; then - LOGINFO "running $i $ACTION" - "$i" "$ACTION" + LOGINFO "running $i $ACTION $OPTIONS" + "$i" "$ACTION" "$OPTIONS" exit $? fi done