Added firstboot script
This commit is contained in:
1 parent
2a92031320
commit
4f7a6b215c
3 files changed
+20
-2
No files matched your search
Regular → Executable
File mode changed.
+5
-2
@@ -1,11 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
echo "Building Virtual Machine for Avans Security Workshop..."
|
||||
echo "(Requires vmbuilder, install with: 'sudo apt-get install python-vm-builder')"
|
||||
|
||||
sudo vmbuilder vmw6 ubuntu --flavour virtual --arch i386 -o \
|
||||
--firstboot boot.sh \
|
||||
--firstboot $DIR/firstboot.sh \
|
||||
--user security --pass security --name "Security Workshop" \
|
||||
--addpkg apache2 --addpkg apache2-mpm-prefork --addpkg phpmyadmin \
|
||||
--addpkg apache2 --addpkg apache2-mpm-prefork \
|
||||
--addpkg git-core \
|
||||
--addpkg php5-cli --addpkg php5-mysql --addpkg libapache2-mod-php5 \
|
||||
--addpkg mysql-server --addpkg mysql-client
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is run the first time the VM boots up.
|
||||
# It configures the VM for the security workshop
|
||||
DIR=/home/security/workshop
|
||||
echo "Initializing this VM for the Security Workshop..."
|
||||
|
||||
# Get the workshop files
|
||||
git clone https://github.com/Avans/Security-Workshop.git $DIR
|
||||
|
||||
# Add boot.sh to the boot sequence
|
||||
echo "$DIR/build-vm/boot.sh" >> /etc/rc.local
|
||||
|
||||
# Resume normal boot sequence
|
||||
$DIR/build-vm/boot.sh
|
||||
Reference in new issue
Block a user