now allowes to specify skel target in config
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
parent
25eff5ff74
commit
82bccb9d1f
|
@ -16,6 +16,7 @@ maxage: 10800
|
||||||
port: 80
|
port: 80
|
||||||
# Files that will be copied into container on startup
|
# Files that will be copied into container on startup
|
||||||
skel: /etc/podterminal/skel.tar.gz
|
skel: /etc/podterminal/skel.tar.gz
|
||||||
|
skel_target: /config
|
||||||
ssl: false
|
ssl: false
|
||||||
ssl_cert: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
ssl_cert: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||||
ssl_cert_key: /etc/ssl/private/ssl-cert-snakeoil.key
|
ssl_cert_key: /etc/ssl/private/ssl-cert-snakeoil.key
|
||||||
|
|
14
pods/skel.go
14
pods/skel.go
|
@ -18,19 +18,23 @@ func CopySkelToContainer(id string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fileInfo, err := os.Stat(viper.GetString("skel"))
|
||||||
|
if err != nil {
|
||||||
|
log.Println("Could not access Skel archive")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
log.Println("Skel Archive is ", fileInfo.Size(), "b")
|
||||||
|
|
||||||
file, err := os.Open(viper.GetString("skel"))
|
file, err := os.Open(viper.GetString("skel"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Could not open skel archive", err)
|
log.Println("Could not open skel archive", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fileInfo, err := os.Stat(viper.GetString("skel"))
|
|
||||||
log.Println("Skel Archive is ", fileInfo.Size(), "b")
|
|
||||||
|
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
params := url.Values{}
|
params := url.Values{}
|
||||||
params.Set("path", "/")
|
params.Set("path", viper.GetString("skel_target"))
|
||||||
|
|
||||||
response, err := conn.DoRequest(
|
response, err := conn.DoRequest(
|
||||||
Socket,
|
Socket,
|
||||||
|
|
|
@ -17,6 +17,7 @@ func readConfigFile() {
|
||||||
viper.SetDefault("dri", false)
|
viper.SetDefault("dri", false)
|
||||||
viper.SetDefault("dir_node", "/dev/dri/renderD128")
|
viper.SetDefault("dir_node", "/dev/dri/renderD128")
|
||||||
viper.SetDefault("skel", "/etc/podterminal/skel.tar.gz")
|
viper.SetDefault("skel", "/etc/podterminal/skel.tar.gz")
|
||||||
|
viper.SetDefault("skel_target", "/")
|
||||||
viper.SetDefault("block_filebrowser", false)
|
viper.SetDefault("block_filebrowser", false)
|
||||||
viper.SetDefault("envvars",
|
viper.SetDefault("envvars",
|
||||||
map[string]string{
|
map[string]string{
|
||||||
|
|
Loading…
Reference in New Issue