mirror of
https://github.com/byReqz/gotty-docker.git
synced 2024-11-22 07:31:15 +00:00
22 lines
473 B
Bash
22 lines
473 B
Bash
#!/bin/sh
|
|
|
|
if [ -z "$port" ];then
|
|
port=8080
|
|
fi
|
|
if [ -n "$userpass" ];then
|
|
creds="-c "$userpass""
|
|
fi
|
|
if [ -z "$title" ];then
|
|
title=gotty
|
|
fi
|
|
if [ -n "$pkgs" ];then
|
|
apk update
|
|
apk add $pkgs
|
|
fi
|
|
if [ -z "$command" ];then
|
|
apk update
|
|
apk add figlet
|
|
command="curl -s https://raw.githubusercontent.com/dylanaraps/pfetch/master/pfetch | ash && figlet no command set && read swag"
|
|
fi
|
|
|
|
/gotty -p "$port" $creds --title-format "$title" tmux new-session -A -s "$title" "$command" |