/shiba-daemon-util

Daemon utility for shiba(v/w)

Primary LanguageJavaScriptMIT LicenseMIT

shiba-daemon-util

Build Status npm Version JS Standard

Daemon utility for shiba(v/w)

Installation

$ npm install shiba-daemon-util --save

Usage

'use strict'

const {subjectFromFile} = require('shiba-daemon-util')

async function tryExample () {
  const example01 = subjectFromFile(
    'jp.realglobe.shiba.daemon.util.example01'
  )

  await example01.sayHi()
}

tryExample().catch((err) => console.error(err))

jp.realglobe.shiba.daemon.util.example01

#!/bin/bash
#

subject=$1
verb=$2
object1=$3
object2=$4

if [[ ${verb} == *"sayHi"* ]]
then
  printf "Hi, ${object1} and ${object2}"
  exit
fi

echo "Unknown verb ${verb}"
exit 1

API Guide

License

This software is released under the MIT License.

Links