­čĆą A Cooperative Medical System
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
936 B

#!/bin/bash
mkdir src/Server/Data
cp shadow.json.default src/Server/Data/shadow.json
cp passwd.json.default src/Server/Data/passwd.json
mkdir src/{Client,Server}/Credentials
openssl genrsa -des3 -out server.temp.key 4096
openssl rsa -in server.temp.key -out src/Server/Credentials/server.key
rm server.temp.key
openssl req -new -key src/Server/Credentials/server.key -out src/Server/Credentials/server.csr
openssl x509 -req -days 365 -in src/Server/Credentials/server.csr -signkey src/Server/Credentials/server.key -out src/Server/Credentials/server.crt
cp src/Server/Credentials/server.crt src/Client/Credentials/server.crt
pushd src/VNC > /dev/null
mkdir bin
gcc -o bin/VNCClient VNCClient/*.c -Wall -Wextra -Wshadow -Wno-missing-field-initializers -Wstrict-overflow -lvncclient -lSDL
gcc -o bin/VNCServer VNCServer/*.c -Wall -Wextra -Wshadow -Wno-missing-field-initializers -Wstrict-overflow -lvncserver
popd > /dev/null
exit 0