Browse Source

fix(RESTORE): move path to pre-flight

- export path so pre-flight checks are using consistent env
master
Asif Bacchus 1 year ago
parent
commit
9a363d8510
  1. 5
      .idea/.idea.MailcowBackup.dir/.idea/codeStyles/codeStyleConfig.xml
  2. 8
      .idea/.idea.MailcowBackup.dir/.idea/indexLayout.xml
  3. 7
      .idea/.idea.MailcowBackup.dir/.idea/riderModule.iml
  4. 3
      .idea/.idea.MailcowBackup.dir/.idea/vcs.xml
  5. 4
      backup/restore.sh

5
.idea/.idea.MailcowBackup.dir/.idea/codeStyles/codeStyleConfig.xml

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

8
.idea/.idea.MailcowBackup.dir/.idea/indexLayout.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelUserStore">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

7
.idea/.idea.MailcowBackup.dir/.idea/riderModule.iml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

3
.idea/.idea.MailcowBackup.dir/.idea/vcs.xml

@ -7,4 +7,7 @@
<inspection_tool class="SubjectLimit" enabled="true" level="ERROR" enabled_by_default="true" />
</profile>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

4
backup/restore.sh

@ -160,6 +160,9 @@ while [ $# -gt 0 ]; do
done
### pre-flight checks
# set path so checks are valid for this script environment
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# docker installed?
if ! command -v docker >/dev/null; then
consoleError '3' 'docker does not seem to be installed!'
@ -184,7 +187,6 @@ fi
### read mailcow.conf and import vars
# shellcheck source=./mailcow.conf.shellcheck
. "$mcConfig"
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export COMPOSE_HTTP_TIMEOUT="$dockerStartTimeout"
### start logging

Loading…
Cancel
Save