#!/usr/bin/env bash

# $1 is service?
# $2 am-agent pid base dir

createOtelCollectorPidFile()
{
   if [[ "$1" = true ]]; then
      sudo mkdir -p "$2" && touch "$2"/am-agent.pid > /dev/null 2>&1
   else
   	   mkdir -p "$2" && touch "$2"/am-agent.pid  > /dev/null 2>&1
   fi
}

createDirectoryWatcherPidFile()
{
   if [[ "$1" = true ]]; then
      sudo mkdir -p "$2" && touch "$2"/directory-watcher.pid > /dev/null 2>&1
   else
   	   mkdir -p "$2" && touch "$2"/directory-watcher.pid  > /dev/null 2>&1
   fi
}
