2020-06-01 11:02:23 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-04-19 13:46:35 -07:00
|
|
|
# Copyright (c) 2018-2022, diyIT.org
|
2020-02-25 11:28:31 -08:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
|
|
|
|
# https://diyit.org/license/
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
session="vm_tmux"
|
|
|
|
|
|
|
|
# set up tmux
|
|
|
|
tmux start-server
|
|
|
|
|
|
|
|
# create a new tmux session, naming the window freepbx
|
|
|
|
tmux new-session -d -s $session -n freepbx
|
|
|
|
tmux selectp -t 1
|
|
|
|
tmux send-keys "cd /mnt/config;./pbx.sh" C-m
|
|
|
|
|
2020-06-11 12:02:40 -07:00
|
|
|
# create a new window windows
|
|
|
|
tmux new-window -t $session:1 -n windows
|
2020-04-11 00:46:09 -07:00
|
|
|
tmux selectp -t 1
|
2020-06-11 12:02:40 -07:00
|
|
|
tmux send-keys "cd /mnt/config;./windows.sh" C-m
|
2020-04-11 00:46:09 -07:00
|
|
|
|
2020-02-25 11:28:31 -08:00
|
|
|
# create a new window ubuntu
|
2020-04-11 00:46:09 -07:00
|
|
|
tmux new-window -t $session:2 -n ubuntu
|
2020-02-25 11:28:31 -08:00
|
|
|
tmux selectp -t 1
|
|
|
|
tmux send-keys "cd /mnt/config;./ubuntu.sh" C-m
|
|
|
|
|
|
|
|
# create a new window freebsd
|
2020-04-11 00:46:09 -07:00
|
|
|
tmux new-window -t $session:3 -n freebsd
|
2020-02-25 11:28:31 -08:00
|
|
|
tmux selectp -t 1
|
|
|
|
tmux send-keys "cd /mnt/config;./freebsd.sh" C-m
|
|
|
|
|
2020-04-11 00:46:09 -07:00
|
|
|
# create a new window w2019
|
|
|
|
tmux new-window -t $session:4 -n w2019
|
2020-02-25 11:28:31 -08:00
|
|
|
tmux selectp -t 1
|
2020-04-11 00:46:09 -07:00
|
|
|
tmux send-keys "cd /mnt/config;./w2019.sh" C-m
|
2020-02-25 11:28:31 -08:00
|
|
|
|
2020-06-11 12:02:40 -07:00
|
|
|
# create a new window r-windows
|
|
|
|
tmux new-window -t $session:5 -n r-windows
|
|
|
|
tmux selectp -t 1
|
|
|
|
tmux send-keys "cd /mnt/config;./r-windows.sh" C-m
|
|
|
|
|
2022-04-19 13:38:56 -07:00
|
|
|
# create a new window gns3
|
|
|
|
tmux new-window -t $session:6 -n gns3
|
2021-02-13 11:38:38 -08:00
|
|
|
tmux selectp -t 1
|
2022-04-19 13:38:56 -07:00
|
|
|
tmux send-keys "cd /mnt/config;./gns3.sh" C-m
|
2021-02-13 11:38:38 -08:00
|
|
|
|
|
|
|
# create a new window cvm-a
|
|
|
|
tmux new-window -t $session:7 -n cvm-a
|
|
|
|
tmux selectp -t 1
|
|
|
|
tmux send-keys "cd /mnt/config;./cvm-a.sh" C-m
|
|
|
|
|
|
|
|
# create a new window cvm-b
|
|
|
|
tmux new-window -t $session:8 -n cvm-b
|
|
|
|
tmux selectp -t 1
|
|
|
|
tmux send-keys "cd /mnt/config;./cvm-b.sh" C-m
|
|
|
|
|
2020-02-25 11:28:31 -08:00
|
|
|
# return to main window
|
|
|
|
tmux select-window -t $session:0
|
|
|
|
tmux selectp -t 1
|
|
|
|
|
|
|
|
# Finished setup, attach to the tmux session!
|
|
|
|
#tmux attach-session -t $session
|