partial
This commit is contained in:
parent
1ac076319a
commit
5af1629cc5
9 changed files with 103 additions and 3 deletions
10
script/s_build
Executable file
10
script/s_build
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
cd createboltcard
|
||||
go build
|
||||
cd ../wipeboltcard
|
||||
go build
|
||||
cd ..
|
||||
go build
|
||||
sudo cp boltcard.service /etc/systemd/system/boltcard.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl stop boltcard
|
||||
sudo systemctl start boltcard
|
||||
23
script/s_create_db
Executable file
23
script/s_create_db
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
# to close any database connections
|
||||
sudo systemctl stop postgresql
|
||||
sudo systemctl start postgresql
|
||||
|
||||
echo If you have previously created the database
|
||||
echo then this will delete it and recreate it.
|
||||
echo
|
||||
echo Key values for cards may be in the database data.
|
||||
echo
|
||||
echo Continue? "(y or n)"
|
||||
|
||||
read x
|
||||
|
||||
if [ "$x" = "y" ]; then
|
||||
psql postgres -f sql/create_db_init.sql
|
||||
psql postgres -f sql/create_db.sql
|
||||
psql postgres -f sql/create_db_user.sql
|
||||
psql postgres -f sql/settings.sql
|
||||
echo Database created
|
||||
else
|
||||
echo No action
|
||||
fi
|
||||
|
||||
4
script/s_launch
Executable file
4
script/s_launch
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
export PATH=$PATH:/usr/local/go/bin
|
||||
|
||||
cd /home/ubuntu/boltcard
|
||||
./boltcard
|
||||
3
script/s_restart
Executable file
3
script/s_restart
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
sudo systemctl daemon-reload
|
||||
sudo systemctl stop boltcard
|
||||
sudo systemctl start boltcard
|
||||
Loading…
Add table
Add a link
Reference in a new issue