add ga launcher, add script to setup notebook
This commit is contained in:
parent
4ab41eafed
commit
1d105d308f
2 changed files with 63 additions and 0 deletions
8
ga.sh
Executable file
8
ga.sh
Executable file
|
@ -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
|
55
install-nicos-notebook
Executable file
55
install-nicos-notebook
Executable file
|
@ -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}
|
Loading…
Reference in a new issue