forked from keylime/keylime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autorun.sh
executable file
·31 lines (21 loc) · 865 Bytes
/
autorun.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
################################################################################
# SPDX-License-Identifier: Apache-2.0
# Copyright 2017 Massachusetts Institute of Technology.
################################################################################
# Start web server
#nginx
# Pause for demo effect
#sleep 0.25m
# Set up new protected space on web server
#cryptsetup luksFormat /var/www/html/payload.enc keyfile.txt
#cryptsetup luksOpen /var/www/html/payload.enc encdrive --key-file keyfile.txt
#mkfs.ext4 -j /dev/mapper/encdrive
# Decrypt and mount protected web server data
mkdir -p /var/www/html/payload/
cryptsetup luksOpen /var/www/html/payload.enc encdrive --key-file keyfile.txt
mount /dev/mapper/encdrive /var/www/html/payload/
# Unmount encrypted space
#umount /var/www/html/payload
#cryptsetup luksClose encdrive
#nginx -s quit