From 25eff5ff748a5f6b618c13893ba8bec1b765a7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20B=C3=BClow?= Date: Wed, 31 Jan 2024 08:21:43 +0100 Subject: [PATCH] skel now applies to the container root, SSL works --- Vagrantfile | 2 +- exampleconfig.yaml | 4 ++-- pods/skel.go | 5 ++--- web/router.go | 1 + 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 7d3d565..0012056 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -93,7 +93,7 @@ Vagrant.configure("2") do |config| # OS apt-get update apt-get upgrade -y - apt-get install -y vim curl git wget qemu-guest-agent make-ssl-cert + apt-get install -y vim curl git wget qemu-guest-agent ssl-cert apt-get install -y nfs-common podman pwgen open-vm-tools make gcc libgpgme-dev apt-get install -y build-essential pkgconf pkgconf-bin libdevmapper-dev libbtrfs-dev echo "export EDITOR=vim" >> /etc/profile diff --git a/exampleconfig.yaml b/exampleconfig.yaml index ffba1ab..2c49a22 100644 --- a/exampleconfig.yaml +++ b/exampleconfig.yaml @@ -14,8 +14,8 @@ image: lscr.io/linuxserver/webtop maxage: 10800 # Port Podterminal should listen to port: 80 -# Files that will be copied into container userhome on startup -skel: /etc/podterminal/skel/ +# Files that will be copied into container on startup +skel: /etc/podterminal/skel.tar.gz ssl: false ssl_cert: /etc/ssl/certs/ssl-cert-snakeoil.pem ssl_cert_key: /etc/ssl/private/ssl-cert-snakeoil.key diff --git a/pods/skel.go b/pods/skel.go index 5c4dfbd..b48d121 100644 --- a/pods/skel.go +++ b/pods/skel.go @@ -10,8 +10,7 @@ import ( "github.com/spf13/viper" ) -// CopySkelToContainer copies an Archive into the containers home directory -// (Assumes the use of a Webtop container) +// CopySkelToContainer copies an Archive into the containers root func CopySkelToContainer(id string) error { log.Println("Copying skel Archive to container") var err error @@ -31,7 +30,7 @@ func CopySkelToContainer(id string) error { defer file.Close() params := url.Values{} - params.Set("path", "/config") + params.Set("path", "/") response, err := conn.DoRequest( Socket, diff --git a/web/router.go b/web/router.go index 791b59f..6385b66 100644 --- a/web/router.go +++ b/web/router.go @@ -31,6 +31,7 @@ func Run() error { } log.Println("Router is ready") if err != nil { + log.Panic("Could not start Webserver: ", err) return err } return nil