-
-
Notifications
You must be signed in to change notification settings - Fork 529
Shellcheck #2775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Shellcheck #2775
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
bb1d5f9
shell check
pranjalg1331 f9a201d
all branchced
pranjalg1331 0fab8d9
cicd toolbox
pranjalg1331 1c42c37
script changes part1
pranjalg1331 1078ceb
script changes part2
pranjalg1331 a5de686
bad script
pranjalg1331 9c9c827
script corrections
pranjalg1331 18062af
remove sample
pranjalg1331 f396c85
Merge pull request #1 from pranjalg1331/shellcheck-test
pranjalg1331 ddf9760
last script
pranjalg1331 e7c7b33
start
pranjalg1331 425d386
pre commit
pranjalg1331 667d00e
update pre commit
pranjalg1331 f31345a
start script error
pranjalg1331 c106660
Merge branch 'develop' into shellcheck
pranjalg1331 35271c3
start update
pranjalg1331 257d03a
error correct
pranjalg1331 e03e633
watchman script change
pranjalg1331 d0e1c32
linter
pranjalg1331 d695471
Update docker/scripts/watchman_install.sh
pranjalg1331 a406197
Update docker/scripts/watchman_install.sh
pranjalg1331 3d722c0
Update docker/scripts/watchman_install.sh
pranjalg1331 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,3 +50,8 @@ repos: | |
| - [email protected] | ||
| args: ["--fix"] | ||
| files: frontend/src/styles/.*(css|scss)$ | ||
| - repo: https://github.com/koalaman/shellcheck-precommit | ||
| rev: v0.7.2 | ||
| hooks: | ||
| - id: shellcheck | ||
| args: ["--severity=warning"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| #!/bin/bash | ||
| cp cron/* /etc/cron.d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| #!/bin/bash | ||
| sudo cp -r logrotate /etc/logrotate.d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| docker exec -ti intelowl_uwsgi python3 manage.py $@ | ||
| #!/bin/bash | ||
| docker exec -ti intelowl_uwsgi python3 manage.py "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| docker exec intelowl_uwsgi ls -al /var/log/intel_owl/$1 | ||
| docker exec -ti intelowl_uwsgi tail -f /var/log/intel_owl/$1 | ||
| #!/bin/bash | ||
|
|
||
| docker exec intelowl_uwsgi ls -al /var/log/intel_owl/"$1" | ||
| docker exec -ti intelowl_uwsgi tail -f /var/log/intel_owl/"$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,33 @@ | ||
| #!/bin/bash | ||
| # diec analyzer variable | ||
| export LD_LIBRARY_PATH="/opt/deploy/die/die_lin64_portable/base:$LD_LIBRARY_PATH" | ||
| # without this makedirs the Dockerfile is not able to create new directories in volumes that already exist | ||
| mkdir -p /var/run/clamav ${LOG_PATH} ${LOG_PATH}/clamav | ||
| chown -R clamav:${USER} /var/lib/clamav /var/run/clamav ${LOG_PATH} | ||
| chmod 755 /var/lib/clamav ${LOG_PATH} /var/run/clamav | ||
| touch ${LOG_PATH}/gunicorn_access.log ${LOG_PATH}/gunicorn_errors.log ${LOG_PATH}/malware_tools_analyzers.log ${LOG_PATH}/malware_tools_analyzers_errors.log | ||
| chown ${USER}:${USER} ${LOG_PATH}/gunicorn_access.log ${LOG_PATH}/gunicorn_errors.log ${LOG_PATH}/malware_tools_analyzers.log ${LOG_PATH}/malware_tools_analyzers_errors.log | ||
| # clamav processes | ||
| mkdir -p /var/run/clamav "${LOG_PATH}" "${LOG_PATH}/clamav" | ||
| chown -R clamav:"${USER}" /var/lib/clamav /var/run/clamav "${LOG_PATH}" | ||
| chmod 755 /var/lib/clamav "${LOG_PATH}" /var/run/clamav | ||
|
|
||
| touch "${LOG_PATH}/gunicorn_access.log" "${LOG_PATH}/gunicorn_errors.log" \ | ||
| "${LOG_PATH}/malware_tools_analyzers.log" "${LOG_PATH}/malware_tools_analyzers_errors.log" | ||
|
|
||
| chown "${USER}:${USER}" "${LOG_PATH}/gunicorn_access.log" "${LOG_PATH}/gunicorn_errors.log" \ | ||
| "${LOG_PATH}/malware_tools_analyzers.log" "${LOG_PATH}/malware_tools_analyzers_errors.log" | ||
|
|
||
| echo "running freshclam" | ||
| freshclam # download db for first time | ||
| freshclam -d & # run updater in bg | ||
| echo "running clamd" | ||
| clamd --debug & # run daemon in bg | ||
| # change user | ||
| su malware_tools_analyzers-user -s /bin/bash | ||
|
|
||
| echo "running fangfrisch" | ||
| /opt/deploy/flask/venv/bin/fangfrisch --conf /etc/clamav/fangfrisch.conf initdb --force | ||
| /opt/deploy/flask/venv/bin/fangfrisch --conf /etc/clamav/fangfrisch.conf refresh & | ||
|
|
||
| echo "running gunicorn" | ||
| # start flask server | ||
| exec /opt/deploy/flask/venv/bin/gunicorn 'app:app' \ | ||
| --bind '0.0.0.0:4002' \ | ||
| --user malware_tools_analyzers-user \ | ||
| --log-level ${LOG_LEVEL} \ | ||
| --access-logfile ${LOG_PATH}/gunicorn_access.log \ | ||
| --error-logfile ${LOG_PATH}/gunicorn_errors.log | ||
| --log-level "${LOG_LEVEL}" \ | ||
| --access-logfile "${LOG_PATH}/gunicorn_access.log" \ | ||
| --error-logfile "${LOG_PATH}/gunicorn_errors.log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.