aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkvmx2
-rwxr-xr-xprovision/desktop-basic12
-rwxr-xr-xprovision/desktop-full12
-rwxr-xr-xprovision/webserver2
4 files changed, 19 insertions, 9 deletions
diff --git a/kvmx b/kvmx
index 7cfce3c..a94caf1 100755
--- a/kvmx
+++ b/kvmx
@@ -364,7 +364,7 @@ function kvmx_provision {
rsync -av -e "$SSH_COMMAND -o Port=$SSH" --rsync-path "sudo rsync" $ORIG/ $SSH_LOGIN@127.0.0.1:$DEST/
fi
- echo "sudo $provision_command $hostname $domain $mirror" | kvmx_ssh
+ echo "$provision_command $hostname $domain $mirror" | kvmx_ssh
}
# Print guest image file name
diff --git a/provision/desktop-basic b/provision/desktop-basic
index 5438b67..a23b3aa 100755
--- a/provision/desktop-basic
+++ b/provision/desktop-basic
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Basic desktop provisioner.
+# Basic desktop provision example.
#
# Parameters
@@ -9,11 +9,11 @@ BASENAME="`basename $0`"
HOSTNAME="$1"
DOMAIN="$2"
MIRROR="$3"
-APT_INSTALL="LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
+APT_INSTALL="sudo LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
# Set hostname
-echo "$HOSTNAME.$DOMAIN" | sudo tee /etc/hostname > /dev/null
-echo "127.0.0.1 $HOSTNAME.$DOMAIN" | sudo tee /etc/hosts > /dev/null
+echo "$HOSTNAME.$DOMAIN" | sudo tee /etc/hostname > /dev/null
+echo "127.0.0.1 $HOSTNAME.$DOMAIN" | sudo tee -a /etc/hosts > /dev/null
# Configure keyboard
cat <<-EOF | sudo tee /etc/default/keyboard > /dev/null
@@ -36,13 +36,15 @@ $APT_INSTALL git
# Tools
if [ ! -e "$apps" ]; then
git clone --recursive https://git.fluxo.info/rhatto/apps
+else
+ ( cd apps && git pull && git submodule update --init )
fi
apps/inception init
apps/inception load
# Environment
-$APT_INSTALL lightdm ratpoison awesome firefox-esr chromium
+$APT_INSTALL lightdm ratpoison awesome firefox-esr chromium torbrowser-launcher
# Configuration
sudo cp $DIRNAME/files/etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
diff --git a/provision/desktop-full b/provision/desktop-full
index 8c2d516..2973e4c 100755
--- a/provision/desktop-full
+++ b/provision/desktop-full
@@ -1,10 +1,18 @@
#!/bin/bash
#
-# Full desktop
+# Full desktop provision example.
#
# Parameters
-APT_INSTALL="LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
+DIRNAME="`dirname $0`"
+BASENAME="`basename $0`"
+HOSTNAME="$1"
+DOMAIN="$2"
+MIRROR="$3"
+APT_INSTALL="sudo LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
+
+# Provision the basic stuff
+$DIRNAME/desktop-basic $HOSTNAME $DOMAIN $MIRROR
# Install cinnamon
$APT_INSTALL cinnamon
diff --git a/provision/webserver b/provision/webserver
index 1ef545e..81423c8 100755
--- a/provision/webserver
+++ b/provision/webserver
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Webserver example.
+# Webserver provision example.
#
sudo apt-get install -y apache2