Install script and supervisor init
parent
e17315e3d2
commit
a70377b94a
@ -1 +1 @@
|
||||
Subproject commit 5f454d6520b5709b8e0cca6de5a9d40ad6b8f323
|
||||
Subproject commit a5c019afc5a210a4296a6474257f9b9a9427b31d
|
@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
# exit script if return code != 0
|
||||
set -e
|
||||
|
||||
# build scripts
|
||||
####
|
||||
|
||||
# download build scripts from github
|
||||
curl --connect-timeout 5 --max-time 600 --retry 5 --retry-delay 0 --retry-max-time 60 -o /tmp/scripts-master.zip -L https://github.com/binhex/scripts/archive/master.zip
|
||||
|
||||
# unzip build scripts
|
||||
unzip /tmp/scripts-master.zip -d /tmp
|
||||
|
||||
# move shell scripts to /root
|
||||
mv /tmp/scripts-master/shell/arch/docker/*.sh /usr/local/bin/
|
||||
|
||||
# detect image arch
|
||||
####
|
||||
|
||||
OS_ARCH=$(cat /etc/os-release | grep -P -o -m 1 "(?=^ID\=).*" | grep -P -o -m 1 "[a-z]+$")
|
||||
if [[ ! -z "${OS_ARCH}" ]]; then
|
||||
if [[ "${OS_ARCH}" == "arch" ]]; then
|
||||
OS_ARCH="x86-64"
|
||||
else
|
||||
OS_ARCH="aarch64"
|
||||
fi
|
||||
echo "[info] OS_ARCH defined as '${OS_ARCH}'"
|
||||
else
|
||||
echo "[warn] Unable to identify OS_ARCH, defaulting to 'x86-64'"
|
||||
OS_ARCH="x86-64"
|
||||
fi
|
||||
|
||||
# pacman packages
|
||||
####
|
||||
|
||||
# define pacman packages
|
||||
pacman_packages="mesa mesa-libgl wayvnc seatd xorg-xwayland noto-fonts gnu-free-fonts"
|
||||
|
||||
# install pre-reqs
|
||||
pacman -S --needed $pacman_packages --noconfirm
|
||||
|
||||
# install locally built cage
|
||||
pacman -U --noconfirm /tmp/cage/*.pkg.tar.zst
|
||||
|
||||
# env vars
|
||||
####
|
||||
# TODO
|
||||
mkdir -p /config
|
||||
|
||||
# cleanup
|
||||
cleanup.sh
|
@ -0,0 +1,4 @@
|
||||
[program:cage]
|
||||
user = nobody
|
||||
command = /usr/bin/cage %(ENV_APP)s
|
||||
priority = 50
|
@ -0,0 +1,4 @@
|
||||
[program:wayvnc]
|
||||
user = nobody
|
||||
command = /usr/bin/wayvnc -C /config/wayvnc/config -g
|
||||
priority = 100
|
Loading…
Reference in New Issue