Skip to content

Commit

Permalink
default-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
willemdh committed Jul 25, 2018
1 parent 8f8b1b2 commit 48b5dec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
23 changes: 10 additions & 13 deletions FireMotD
@@ -1,6 +1,6 @@
#!/bin/bash
# Script name: FireMotD
# Version: v10.02.180725
# Version: v10.03.180725
# Created on: 10/02/2014
# Author: Willem D'Haese
# Contributors: Thomas Dietrich, Dmitry Romanenko
Expand Down Expand Up @@ -607,7 +607,7 @@ ExportData () {
WriteLog Output Error "Template folder doesn't exist. Upgrading from an older version? Please run make again or run the install function \"FireMotD -I -v\"."
exit 2
elif [[ -s "$ExportFile" ]] ; then
WriteLog Verbose Info "Exportfile $ExportFile found"
WriteLog Verbose Info "Exportfile $ExportFile found, template type $TemplateType"
if [[ "$TemplateType" != "default" ]] ; then
if [[ -s "/usr/share/firemotd/templates/FireMotD-template-${TemplateType}.json" ]] ; then
WriteLog Verbose Info "Template type set to ${TemplateType}. Overwriting.."
Expand All @@ -616,15 +616,14 @@ ExportData () {
else
WriteLog Output Error "Template ${TemplateType} does not exist. Try running the install function \"FireMotD -I -v\"."
exit 2
fi
fi
else
TemplateType="basic"
if [[ -s "/usr/share/firemotd/templates/FireMotD-template-${TemplateType}.json" ]] ; then
if [[ ! -f "/usr/share/firemotd/data/FireMotD.json" ]] ; then
TemplateType="basic"
cp "/usr/share/firemotd/templates/FireMotD-template-${TemplateType}.json" $ExportFile
chmod 766 $ExportFile
else
WriteLog Output Error "Template ${TemplateType} does not exist. Try running the install function \"FireMotD -I -v\"."
exi 2
WriteLog Verbose Info "No data template selected. Leaving as-is.."
fi
fi
else
Expand All @@ -640,14 +639,12 @@ v\"."
exit 2
fi
else
TemplateType="basic"
if [[ -s "/usr/share/firemotd/templates/FireMotD-template-${TemplateType}.json" ]] ; then
if [[ ! -f "/usr/share/firemotd/data/FireMotD.json" ]] ; then
TemplateType="basic"
cp "/usr/share/firemotd/templates/FireMotD-template-${TemplateType}.json" $ExportFile
chmod 766 $ExportFile
else
WriteLog Output Error "Template ${TemplateType} does not exist. Try running the install function \"FireMotD -I -
v\"."
exi 2
WriteLog Verbose Info "No data template selected. Leaving as-is.."
fi
fi
fi
Expand Down Expand Up @@ -1594,7 +1591,7 @@ InstallFireMotD () {
WriteLog Debug Info "Install result: $InstallResult"
fi
WriteLog Output Info "Generating information"
/usr/local/bin/FireMotD -S
/usr/local/bin/FireMotD -S -d
WriteLog Output Info "Generating FireMotD"
/usr/local/bin/FireMotD -t Digipolis
}
Expand Down
1 change: 1 addition & 0 deletions themes/FireMotD-theme-Elastic.json
Expand Up @@ -10,6 +10,7 @@
"KeyColor": "\\e[38;5;126m",
"Separator": "=>",
"SeparatorColor": "\\e[38;5;221m",
"SeparatorSpace": 12,
"ValueColor": "\\e[38;5;33m",
"HighlightColor": "\\e[38;5;75m"
},
Expand Down

0 comments on commit 48b5dec

Please sign in to comment.