mirror of
https://github.com/byReqz/gotty-docker.git
synced 2024-11-25 08:54:54 +00:00
24 lines
502 B
Bash
24 lines
502 B
Bash
#!/bin/bash
|
|
|
|
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
|
|
apt-get update
|
|
apt-get install $pkgs
|
|
fi
|
|
if [ -z "$command" ];then
|
|
apt-get update
|
|
apt-get install figlet
|
|
command="curl -s https://raw.githubusercontent.com/dylanaraps/pfetch/master/pfetch | bash && figlet no command set && read swag"
|
|
fi
|
|
|
|
/gotty -p "$port" $creds --title-format "$title" tmux new-session -A -s "$title" "$command"
|
|
|