#!/bin/bash

echo "プラグイン初期化開始"
wget http://ftp.orca.med.or.jp/pub/data/receipt/chihoukouhi/uninstallshell.tgz
tar xvzf uninstallshell.tgz
cd uninstallshell
sudo bash uninstall.sh
cd

wget http://ftp.orca.med.or.jp/pub/data/receipt/forms/uninstallshell_forms.tgz
tar xvzf uninstallshell_forms.tgz
cd uninstallshell_forms
sudo bash uninstall_forms.sh
cd

sudo rm -rf /var/lib/jma-receipt/plugin/*
sudo -u orca psql orca -c "delete from tbl_plugin ;"
echo "プラグイン初期化終了"
