FlexitimeTracker/CardReaderService/install.sh

26 lines
608 B
Bash

#!/bin/sh
if [ -z "$1" ]
then
echo "No arguments supplied, supply the base path"
fi
echo "Installing dependencies"
apt-get install mono-complete pcscd supervisor -y
echo "Modifying supervisor conf file"
sed -i "s|/DIRECTORYTOSET|$1|g" CardReaderService.conf
echo "Installing service configuration file"
cp CardReaderService.conf /etc/supervisor/conf.d/
echo "Installing applicaton"
mkdir $1/CardReaderService
cp ./*.* $1/CardReaderService
cd $1/CardReaderService
rm *.pdb
rm *.vshost.exe
rm *.vshost.exe.config
rm *.vshost.exe.manifest
echo "Starting application........."
service supervisor restart