mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
remote quotes
This commit is contained in:
@@ -467,6 +467,8 @@ configure_minion() {
|
|||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
"use_superseded:"\
|
"use_superseded:"\
|
||||||
" - module.run"\
|
" - module.run"\
|
||||||
|
"log_level: info"\
|
||||||
|
"log_level_logfile: info"\
|
||||||
"log_file: /opt/so/log/salt/minion" >> "$minion_config"
|
"log_file: /opt/so/log/salt/minion" >> "$minion_config"
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -554,7 +556,7 @@ check_requirements() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compare_versions() {
|
compare_versions() {
|
||||||
manager_ver=$("$sshcmd" -i /root/.ssh/so.key soremote@"$MSRV" cat /etc/soversion)
|
manager_ver=$($sshcmd -i /root/.ssh/so.key soremote@"$MSRV" cat /etc/soversion)
|
||||||
|
|
||||||
if [[ $manager_ver == "" ]]; then
|
if [[ $manager_ver == "" ]]; then
|
||||||
rm /root/install_opt
|
rm /root/install_opt
|
||||||
@@ -975,7 +977,7 @@ download_repo_tarball() {
|
|||||||
mkdir -p /root/manager_setup/securityonion
|
mkdir -p /root/manager_setup/securityonion
|
||||||
{
|
{
|
||||||
local manager_ver
|
local manager_ver
|
||||||
manager_ver=$("$sshcmd" -i /root/.ssh/so.key soremote@"$MSRV" cat /etc/soversion)
|
manager_ver=$($sshcmd -i /root/.ssh/so.key soremote@"$MSRV" cat /etc/soversion)
|
||||||
$scpcmd -i /root/.ssh/so.key soremote@"$MSRV":/opt/so/repo/"$manager_ver".tar.gz /root/manager_setup
|
$scpcmd -i /root/.ssh/so.key soremote@"$MSRV":/opt/so/repo/"$manager_ver".tar.gz /root/manager_setup
|
||||||
} >> "$setup_log" 2>&1
|
} >> "$setup_log" 2>&1
|
||||||
|
|
||||||
@@ -1968,6 +1970,8 @@ set_progress_str() {
|
|||||||
|
|
||||||
echo -e "$percentage_str"
|
echo -e "$percentage_str"
|
||||||
|
|
||||||
|
info "Progressing ($percentage%): $progress_bar_text"
|
||||||
|
|
||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
'----'\
|
'----'\
|
||||||
"$percentage% - ${progress_bar_text^^}"\
|
"$percentage% - ${progress_bar_text^^}"\
|
||||||
@@ -1978,9 +1982,9 @@ set_ssh_cmds() {
|
|||||||
local automated=$1
|
local automated=$1
|
||||||
|
|
||||||
if [ $automated == yes ]; then
|
if [ $automated == yes ]; then
|
||||||
sshcmd='sshpass -p "automation" ssh -o StrictHostKeyChecking=no'
|
sshcmd='sshpass -p "$SOREMOTEPASS1" ssh -o StrictHostKeyChecking=no'
|
||||||
sshcopyidcmd='sshpass -p "automation" ssh-copy-id -o StrictHostKeyChecking=no'
|
sshcopyidcmd='sshpass -p "$SOREMOTEPASS1" ssh-copy-id -o StrictHostKeyChecking=no'
|
||||||
scpcmd='sshpass -p "automation" scp -o StrictHostKeyChecking=no'
|
scpcmd='sshpass -p "$SOREMOTEPASS1" scp -o StrictHostKeyChecking=no'
|
||||||
else
|
else
|
||||||
sshcmd='ssh'
|
sshcmd='ssh'
|
||||||
sshcopyidcmd='ssh-copy-id'
|
sshcopyidcmd='ssh-copy-id'
|
||||||
@@ -2212,6 +2216,13 @@ mark_version() {
|
|||||||
echo "$SOVERSION" > /etc/soversion
|
echo "$SOVERSION" > /etc/soversion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_sudoers_for_testing() {
|
||||||
|
if [ -n "$TESTING" ]; then
|
||||||
|
info "Ensuring $INSTALLUSERNAME has password-less sudo access for automated testing purposes."
|
||||||
|
sed -i "s/^$INSTALLUSERNAME ALL=(ALL) ALL/$INSTALLUSERNAME ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
update_sudoers() {
|
update_sudoers() {
|
||||||
|
|
||||||
if ! grep -qE '^soremote\ ALL=\(ALL\)\ NOPASSWD:(\/usr\/bin\/salt\-key|\/opt\/so\/saltstack)' /etc/sudoers; then
|
if ! grep -qE '^soremote\ ALL=\(ALL\)\ NOPASSWD:(\/usr\/bin\/salt\-key|\/opt\/so\/saltstack)' /etc/sudoers; then
|
||||||
|
|||||||
Reference in New Issue
Block a user