Shellcheck

This commit is contained in:
Kroese 2023-03-31 07:59:58 +02:00 committed by GitHub
parent fa8a8b8022
commit 22ba58408f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,14 +5,14 @@ LOGFILE="/var/log/agent.log"
SCRIPT="/usr/local/bin/agent.sh"
status() {
if [ -f $PIDFILE ]; then
if [ -f "$PIDFILE" ]; then
echo 'Service running' >&2
return 1
fi
}
start() {
if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then
if [ -f "$PIDFILE" ] && kill -0 $(cat "$PIDFILE"); then
echo 'Service already running' >&2
return 1
fi