Updated some stuff
This commit is contained in:
parent
3352e92869
commit
45bcbbb4ab
2
TeaSpeak
2
TeaSpeak
@ -1 +1 @@
|
||||
Subproject commit 14d9936d90e5a25196020a09221b00a76df8ce83
|
||||
Subproject commit 035f23ef23d5e255902f524f33465be3a61db5a4
|
@ -1 +1 @@
|
||||
Subproject commit 3bc7c7371c2e38d1577c99427e3d736c932ee18e
|
||||
Subproject commit 88e6be81bbe42c4f2f88960a78f6e2871d06ee60
|
@ -44,7 +44,9 @@ mkdir build || exit 1
|
||||
cd build || exit 1
|
||||
|
||||
echo "Build type: $_build_type"
|
||||
cmake .. -DCMAKE_BUILD_TYPE="$_build_type" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DBUILD_INCLUDE_FILE="$_build_helper_dir"/cmake/config/tearoot-server.cmake -DCMAKE_MODULE_PATH="$_build_helper_dir/cmake/" -DDISABLE_QT=1 -DDISABLE_CUSTOM_OUTPUT=ON -DDISABLE_QT=ON -DCOMPILE_WEB_CLIENT="$_web_flag" $TEASPEAK_DEPLOY_TYPE_SPECIFIER
|
||||
_command="cmake .. -DCMAKE_BUILD_TYPE=\"$_build_type\" -DCMAKE_CXX_FLAGS=\"${CXX_FLAGS}\" -DBUILD_INCLUDE_FILE=\"$_build_helper_dir/cmake/config/tearoot-server.cmake\" -DCMAKE_MODULE_PATH=\"$_build_helper_dir/cmake/\" -DDISABLE_QT=1 -DDISABLE_CUSTOM_OUTPUT=ON -DDISABLE_QT=ON -DCOMPILE_WEB_CLIENT=\"$_web_flag\" $TEASPEAK_DEPLOY_TYPE_SPECIFIER"
|
||||
echo "> $_command"
|
||||
eval $_command
|
||||
_code=$?
|
||||
if [[ $_code -ne 0 ]]; then
|
||||
echo "Failed to run CMAKE project"
|
||||
|
@ -14,8 +14,8 @@ requires_rebuild ${library_path}
|
||||
|
||||
cd protobuf || exit 1
|
||||
# git checkout 3.5.1.1
|
||||
[[ ! -d build ]] && { mkdir build || exit 1; }
|
||||
cd build || exit 1
|
||||
[[ ! -d _build ]] && { mkdir _build || exit 1; }
|
||||
cd _build || exit 1
|
||||
cmake ../cmake/ -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_CXX_FLAGS="-std=c++11 -fPIC ${CXX_FLAGS}" -DCMAKE_C_FLAGS="${C_FLAGS}" -DCMAKE_BUILD_TYPE=RelWithDebInfo ${CMAKE_OPTIONS} || exit 1
|
||||
make ${CMAKE_MAKE_OPTIONS} || exit 1
|
||||
sudo make install || exit 1
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 7227fa78ee2432984d721b952dfe05bed35f1fa8
|
||||
Subproject commit b7d56470c94c742342f1895621b9ab5505cd8b00
|
54
ubuntu_setup_env.sh
Normal file
54
ubuntu_setup_env.sh
Normal file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SSHD_LISTEN_ADDRESS=127.0.0.1
|
||||
if [ -e "/dev/vsock" ]; then # in case of WSL2
|
||||
SSHD_LISTEN_ADDRESS=0.0.0.0
|
||||
fi
|
||||
|
||||
SSHD_PORT=2222
|
||||
SSHD_FILE=/etc/ssh/sshd_config
|
||||
SUDOERS_FILE=/etc/sudoers
|
||||
|
||||
# 0. update package lists
|
||||
sudo apt-get update
|
||||
|
||||
# 0.1. reinstall sshd (workaround for initial version of WSL)
|
||||
sudo apt remove -y --purge openssh-server
|
||||
sudo apt install -y openssh-server
|
||||
|
||||
# 0.2. install basic dependencies
|
||||
sudo apt install -y cmake gcc clang gdb valgrind build-essential
|
||||
|
||||
# 1.1. configure sshd
|
||||
sudo cp $SSHD_FILE ${SSHD_FILE}.`date '+%Y-%m-%d_%H-%M-%S'`.back
|
||||
sudo sed -i '/^Port/ d' $SSHD_FILE
|
||||
sudo sed -i '/^ListenAddress/ d' $SSHD_FILE
|
||||
sudo sed -i '/^UsePrivilegeSeparation/ d' $SSHD_FILE
|
||||
sudo sed -i '/^PasswordAuthentication/ d' $SSHD_FILE
|
||||
echo "# configured by CLion" | sudo tee -a $SSHD_FILE
|
||||
echo "ListenAddress ${SSHD_LISTEN_ADDRESS}" | sudo tee -a $SSHD_FILE
|
||||
echo "Port ${SSHD_PORT}" | sudo tee -a $SSHD_FILE
|
||||
echo "UsePrivilegeSeparation no" | sudo tee -a $SSHD_FILE
|
||||
echo "PasswordAuthentication yes" | sudo tee -a $SSHD_FILE
|
||||
# 1.2. apply new settings
|
||||
sudo service ssh --full-restart
|
||||
|
||||
# 2. autostart: run sshd
|
||||
sed -i '/^sudo service ssh --full-restart/ d' ~/.bashrc
|
||||
echo "%sudo ALL=(ALL) NOPASSWD: /usr/sbin/service ssh --full-restart" | sudo tee -a $SUDOERS_FILE
|
||||
cat << 'EOF' >> ~/.bashrc
|
||||
sshd_status=$(service ssh status)
|
||||
if [[ $sshd_status = *"is not running"* ]]; then
|
||||
sudo service ssh --full-restart
|
||||
fi
|
||||
EOF
|
||||
|
||||
|
||||
# summary: SSHD config info
|
||||
echo
|
||||
echo "SSH server parameters ($SSHD_FILE):"
|
||||
echo "ListenAddress ${SSHD_LISTEN_ADDRESS}"
|
||||
echo "Port ${SSHD_PORT}"
|
||||
echo "UsePrivilegeSeparation no"
|
||||
echo "PasswordAuthentication yes"
|
Loading…
Reference in New Issue
Block a user