Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 222cc2594d | |||
| cb3226308f | |||
| 513705cc40 | |||
| 788064d019 | |||
| 77ec20a768 |
@@ -22,6 +22,8 @@ SUDO_USER="<SUDO USER NAME TO USE>"
|
|||||||
USE_SUDO=<1: use sudo, 0: no sudo used>
|
USE_SUDO=<1: use sudo, 0: no sudo used>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The script will create the sudo user if needed automatically
|
||||||
|
|
||||||
### base_setup.sh
|
### base_setup.sh
|
||||||
|
|
||||||
as is, if the folder exists it will only copy the scripts, will not alter or change anything.
|
as is, if the folder exists it will only copy the scripts, will not alter or change anything.
|
||||||
|
|||||||
@@ -39,6 +39,15 @@ if [ "$(whoami)" != "root" ]; then
|
|||||||
error=1;
|
error=1;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
if [ -z "$(command -v setfacl)" ]; then
|
||||||
|
echo "Missing setfacl command, aborting";
|
||||||
|
error=1;
|
||||||
|
fi;
|
||||||
|
if [ -z "$(command -v git)" ]; then
|
||||||
|
echo "Missing git command, aborting";
|
||||||
|
error=1;
|
||||||
|
fi;
|
||||||
|
|
||||||
if [ $error -eq 1 ]; then
|
if [ $error -eq 1 ]; then
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ else
|
|||||||
SSH_TEST=("${SUDO_COMMAND[@]}" "ssh" "${REMOTE_HOST}");
|
SSH_TEST=("${SUDO_COMMAND[@]}" "ssh" "${REMOTE_HOST}");
|
||||||
result=$("${SSH_TEST[@]}" 2>&1);
|
result=$("${SSH_TEST[@]}" 2>&1);
|
||||||
# this can be key or deploy key
|
# this can be key or deploy key
|
||||||
validate_string="You've successfully authenticated with the "
|
validate_string="You've successfully authenticated"
|
||||||
if [[ "$result" != *"$validate_string"* ]]; then
|
if [[ "$result" != *"$validate_string"* ]]; then
|
||||||
echo "Could not connect to ${REMOTE_HOST}: ${result}";
|
echo "Could not connect to ${REMOTE_HOST}: ${result}";
|
||||||
error=1;
|
error=1;
|
||||||
|
|||||||
0
src/bin/switch_branch.sh
Normal file → Executable file
0
src/bin/switch_branch.sh
Normal file → Executable file
Reference in New Issue
Block a user