From 16ebd298483734e320d2aeaffbd09b235169daf7 Mon Sep 17 00:00:00 2001 From: azlux Date: Fri, 16 Feb 2018 01:03:18 +0100 Subject: [PATCH] Use env instead of /bin/sh better for flexible shell --- install.sh | 4 ++-- log2ram | 2 +- log2ram.hourly | 2 +- uninstall.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 90db97e..d04ed2a 100644 --- a/install.sh +++ b/install.sh @@ -1,9 +1,9 @@ -#!/bin/sh +#!/usr/bin/env sh [ -d /var/hdd.log ] && echo "ERROR: log2ram still installed. Uninstall first!" [ -d /var/hdd.log ] && exit 1 -if [ $(id -u) -eq 0 ] +if [ "$(id -u)" -eq 0 ] then cp log2ram.service /etc/systemd/system/log2ram.service chmod 644 /etc/systemd/system/log2ram.service diff --git a/log2ram b/log2ram index 6c2fd6c..127a703 100755 --- a/log2ram +++ b/log2ram @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh . /etc/log2ram.conf diff --git a/log2ram.hourly b/log2ram.hourly index d7da285..3c266c1 100644 --- a/log2ram.hourly +++ b/log2ram.hourly @@ -1,3 +1,3 @@ -#!/bin/sh +#!/usr/bin/env sh systemctl reload log2ram diff --git a/uninstall.sh b/uninstall.sh index 47bfad3..7a82692 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,6 +1,6 @@ -#!/bin/sh +#!/usr/bin/env sh -if [ $(id -u) -eq 0 ] +if [ "$(id -u)" -eq 0 ] then service log2ram stop systemctl disable log2ram