Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
set -x
set -e
DEV=/dev/sdb
if ! sudo parted -lm 2>/dev/null | grep scsi | grep "$DEV" > /dev/null; then
echo "refusing to work on a device that is not a scsi disk" >&2
exit 1
@josch
josch / phenotips_tomcat.sh
Created August 28, 2018 11:09
Setting up phenotips on Ubuntu Xenial with Tomcat
#!/bin/sh
set -exu
directory=ubuntu-xenial-robot
debootstrap --variant=minbase --include=dbus,systemd-sysv xenial "$directory" http://archive.ubuntu.com/ubuntu/
systemd-nspawn --boot --resolv-conf=copy-host --directory="$directory" &
pid=$!
@josch
josch / phenotips_tomcat_mysql.sh
Created August 28, 2018 11:10
Setting up phenotips on Ubuntu Xenial with Tomcat and MySQL
#!/bin/sh
set -exu
directory=ubuntu-xenial-robot
debootstrap --variant=minbase --include=dbus,systemd-sysv xenial "$directory" http://archive.ubuntu.com/ubuntu/
systemd-nspawn --boot --resolv-conf=copy-host --directory="$directory" &
pid=$!