This repository has been archived on 2023-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
ACMS/setUpWorkingEnvironment.sh

23 lines
936 B
Bash

#!/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