diff --git a/snap/hooks/install b/snap/hooks/install index 505bfb9..08abb41 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e # Define a function to log messages log() { diff --git a/snap/local/image_view_launcher.sh b/snap/local/image_view_launcher.sh index b8a1a2c..2b11119 100755 --- a/snap/local/image_view_launcher.sh +++ b/snap/local/image_view_launcher.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/bash -e # Get the namespace and device namespace from snapctl NAMESPACE="$(snapctl get driver.namespace)" diff --git a/snap/local/launcher.sh b/snap/local/launcher.sh index 9509c92..c982f32 100755 --- a/snap/local/launcher.sh +++ b/snap/local/launcher.sh @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/bin/bash -e log() { local message="$1" diff --git a/snap/local/start_launcher.sh b/snap/local/start_launcher.sh index 3f1ddc4..a13d124 100755 --- a/snap/local/start_launcher.sh +++ b/snap/local/start_launcher.sh @@ -1,10 +1,6 @@ -#!/bin/sh -e +#!/bin/bash -e -log() { - local message="$1" - # Log the message with logger - logger -t "${SNAP_NAME}" "stop: $message" -} +source $SNAP/usr/bin/utils.sh log "Start ${SNAP_NAME}.daemon service" snapctl start --enable ${SNAP_NAME}.daemon 2>&1 || true diff --git a/snap/local/stop_launcher.sh b/snap/local/stop_launcher.sh index c77d02f..9b40d4e 100755 --- a/snap/local/stop_launcher.sh +++ b/snap/local/stop_launcher.sh @@ -1,10 +1,6 @@ -#!/bin/sh -e +#!/bin/bash -e -log() { - local message="$1" - # Log the message with logger - logger -t "${SNAP_NAME}" "stop: $message" -} +source $SNAP/usr/bin/utils.sh log "Stop ${SNAP_NAME}.daemon service" snapctl stop --disable ${SNAP_NAME}.daemon 2>&1 || true