diff --git a/ga.sh b/ga.sh new file mode 100755 index 0000000..da6a493 --- /dev/null +++ b/ga.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +for url in \ + https://analytics.google.com/analytics/web/#/report-home/a62285904w148949408p153837579 \ + https://analytics.google.com/analytics/web/#/report-home/a62285904w148936346p153856341 \ + https://analytics.google.com/analytics/web/#/report-home/a62285904w97282594p101425900; do + chromium --new-window ${url} +done diff --git a/install-nicos-notebook b/install-nicos-notebook new file mode 100755 index 0000000..6107ae6 --- /dev/null +++ b/install-nicos-notebook @@ -0,0 +1,55 @@ +#!/bin/sh + +set -x +set -e + +# 1. Create partitions +# 2. install OS +# 3. configure with cdist +# 4. start initial sync (mbsync, nextcloud) + +# Things to automate: +# - mbsync call (?) +# - nextcloud sync / config +# - wireguard installation / config + +# Things to fix: +# cdist sets hostname of HOST when running in chroot! + +if [ $# -ne 1 ]; then + echo "$0 name-of-the-notebook" + exit 1 +fi + +# Get OS + +alpine_version=3.10.2 +alpine_url=http://dl-cdn.alpinelinux.org/alpine/v3.10/releases/x86_64/alpine-minirootfs-${alpine_version}-x86_64.tar.gz + +hostname=nicos-notebook + +tmpdir=$(mktemp -d) +tmpdir=/tmp/tmp.w5LTsMtCDX + +root_dir=${tmpdir}/rootfs +dot_cdist=~/vcs/nico-dot-cdist/ +cdist_dir=~/vcs/cdist +cdist_copy=${cdist_dir}/other/examples/remote/chroot/copy +cdist_exec=${cdist_dir}/other/examples/remote/chroot/exec + +cd ${tmpdir} + +# get alpine chroot / extract +wget -c ${alpine_url} -O alpine.tar.gz +mkdir ${root_dir} +chmod 0755 ${root_dir} +cd ${root_dir} +sudo tar xvfz ${tmpdir}/alpine.tar.gz + +# enable networking +sudo cp /etc/resolv.conf ${root_dir}/etc/ +sudo sudo chroot ${root_dir} apk update + +sudo ${cdist_dir}/bin/cdist config -vv -c ${dot_cdist} \ + --remote-copy "${cdist_copy} ${root_dir}" \ + --remote-exec "${cdist_exec} ${root_dir}" ${hostname}