Commit 1d105d30 authored by Nico Schottelius's avatar Nico Schottelius

add ga launcher, add script to setup notebook

parent 4ab41eaf
#!/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
#!/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}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment