create split mystic config scripts
This commit is contained in:
parent
97289025bf
commit
53a5b05a9c
148
install-next.sh
148
install-next.sh
@ -195,138 +195,28 @@ source $MSTEMPDIR/mystic/fail2ban/install-${SCRIPT_VER}.sh
|
||||
# Add Fail2ban | banip
|
||||
source $MSTEMPDIR/mystic/dosemu2/install-${SCRIPT_VER}.sh
|
||||
|
||||
exit 0
|
||||
|
||||
#==============================================================================================================
|
||||
|
||||
sed -e 's/\\/\//g' -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e "s!c:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e "s!d:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e "s!d:/nodelist!${MYSTIC_DIR}/files/nodelist!g" -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e 's/\\/\//g' -i ${MYSTIC_DIR}/mide.ini
|
||||
sed -e "s!c:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mide.ini
|
||||
# Mystic install
|
||||
source $MSTEMPDIR/mystic/mystic/config-${SCRIPT_VER}.sh
|
||||
# Add Spellcheck
|
||||
source $MSTEMPDIR/mystic/spellcheck/config-${SCRIPT_VER}.sh
|
||||
# Add Multi Relay Chat Client
|
||||
source $MSTEMPDIR/mystic/mrc-client/config-${SCRIPT_VER}.sh
|
||||
# Add Multi Relay Chat Server
|
||||
source $MSTEMPDIR/mystic/mrc-server/config-${SCRIPT_VER}.sh
|
||||
# Add Cryptlib support
|
||||
source $MSTEMPDIR/mystic/cryptlib/config-${SCRIPT_VER}.sh
|
||||
# Add IP2Location
|
||||
source $MSTEMPDIR/mystic/ip2location/config-${SCRIPT_VER}.sh
|
||||
# Add DBP Scripts
|
||||
source $MSTEMPDIR/mystic/dbp/config-${SCRIPT_VER}.sh
|
||||
# Add Fail2ban | banip
|
||||
source $MSTEMPDIR/mystic/fail2ban/config-${SCRIPT_VER}.sh
|
||||
# Add Fail2ban | banip
|
||||
source $MSTEMPDIR/mystic/dosemu2/config-${SCRIPT_VER}.sh
|
||||
|
||||
mkdir -p ${MYSTIC_DIR}/mutil.d
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed '/\[General\]/q' | sed '$d' > ${MUTIL_DIR}/README.txt
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[General\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/General
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FIDONET\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FIDONET.NA
|
||||
configarray=('Import_FIDONET.NA')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FILEBONE\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FILEBONE.NA
|
||||
configarray+=('Import_FILEBONE.NA')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_FILEBONE\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_FILEBONE.NA
|
||||
configarray+=('Export_FILEBONE.NA')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_AREAS\.BBS\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_AREAS.BBS
|
||||
configarray+=('Export_AREAS.BBS')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_GOLDED\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_GOLDED
|
||||
configarray+=('Export_GOLDED')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FILES\.BBS\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FILES.BBS
|
||||
configarray+=('Import_FILES.BBS')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[MassUpload\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/MassUpload
|
||||
configarray+=('MassUpload')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[GenerateTopLists\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/GenerateTopLists
|
||||
configarray+=('GenerateTopLists')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[GenerateAllFiles\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/GenerateAllFiles
|
||||
configarray+=('GenerateAllFiles')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PurgeMessageBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PurgeMessageBases
|
||||
configarray+=('PurgeMessageBases')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackMessageBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackMessageBases
|
||||
configarray+=('PackMessageBases')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PostTextFiles\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PostTextFiles
|
||||
configarray+=('PostTextFiles')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_MessageBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_MessageBase
|
||||
configarray+=('Import_MessageBase')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[ImportEchoMail\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/ImportEchoMail
|
||||
configarray+=('ImportEchoMail')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[ExportEchoMail\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/ExportEchoMail
|
||||
configarray+=('ExportEchoMail')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[MergeNodeLists\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/MergeNodeLists
|
||||
configarray+=('MergeNodeLists')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[FileToss\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/FileToss
|
||||
configarray+=('FileToss')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackFileBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackFileBases
|
||||
configarray+=('PackFileBases')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[LinkMessages\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/LinkMessages
|
||||
configarray+=('LinkMessages')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PurgeUserBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PurgeUserBase
|
||||
configarray+=('PurgeUserBase')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackUserBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackUserBase
|
||||
configarray+=('PackUserBase')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[FileSort\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/FileSort
|
||||
configarray+=('FileSort')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[AutoHatch\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/AutoHatch
|
||||
configarray+=('AutoHatch')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[EchoNodeTracker\]/, $p' | sed '$d' > ${MUTIL_DIR}/EchoNodeTracker
|
||||
configarray+=('EchoNodeTracker')
|
||||
|
||||
pushd ${MUTIL_DIR} &>/dev/null
|
||||
#=====================================================================================#
|
||||
|
||||
configfile="maint.ini"
|
||||
config=('PurgeMessageBases' 'PackMessageBases' 'MergeNodeLists' 'PackFileBases' 'PurgeUserBase' 'PackUserBase' 'FileSort')
|
||||
preparray=("${configarray[@]}")
|
||||
for el in ${config[@]}
|
||||
do
|
||||
preparray=("${preparray[@]/$el}")
|
||||
done
|
||||
|
||||
cat General ${config[@]} > ${MYSTIC_DIR}/${configfile}
|
||||
for el in ${preparray[@]}
|
||||
do
|
||||
sed -e "/$el/d" -i ${MYSTIC_DIR}/${configfile}
|
||||
done
|
||||
|
||||
#=====================================================================================#
|
||||
|
||||
configfile="mailout.ini"
|
||||
config=('ExportEchoMail')
|
||||
preparray=("${configarray[@]}")
|
||||
for el in ${config[@]}
|
||||
do
|
||||
preparray=("${preparray[@]/$el}")
|
||||
done
|
||||
|
||||
cat General ${config[@]} > ${MYSTIC_DIR}/${configfile}
|
||||
for el in ${preparray[@]}
|
||||
do
|
||||
sed -e "/$el/d" -i ${MYSTIC_DIR}/${configfile}
|
||||
done
|
||||
|
||||
|
||||
#=====================================================================================#
|
||||
|
||||
configfile="mailin.ini"
|
||||
config=('ImportEchoMail' 'FileToss')
|
||||
preparray=("${configarray[@]}")
|
||||
for el in ${config[@]}
|
||||
do
|
||||
preparray=("${preparray[@]/$el}")
|
||||
done
|
||||
|
||||
cat General ${config[@]} > ${MYSTIC_DIR}/${configfile}
|
||||
for el in ${preparray[@]}
|
||||
do
|
||||
sed -e "/$el/d" -i ${MYSTIC_DIR}/${configfile}
|
||||
done
|
||||
|
||||
|
||||
#=====================================================================================#
|
||||
|
||||
configfile="importna.ini"
|
||||
config=('Import_FIDONET.NA' 'Import_FILEBONE.NA')
|
||||
preparray=("${configarray[@]}")
|
||||
for el in ${config[@]}
|
||||
do
|
||||
preparray=("${preparray[@]/$el}")
|
||||
done
|
||||
|
||||
cat General ${config[@]} > ${MYSTIC_DIR}/${configfile}
|
||||
for el in ${preparray[@]}
|
||||
do
|
||||
sed -e "/$el/d" -i ${MYSTIC_DIR}/${configfile}
|
||||
done
|
||||
|
||||
|
||||
#=====================================================================================#
|
||||
#==============================================================================================================
|
||||
|
||||
chown mystic:mystic -R ${MYSTIC_DIR} &>/dev/null
|
||||
popd &>/dev/null
|
||||
|
@ -0,0 +1,67 @@
|
||||
msg_info "Correcting mutil.ini & mide.ini hardcoded paths"
|
||||
sed -e 's/\\/\//g' -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e "s!c:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e "s!d:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e "s!d:/nodelist!${MYSTIC_DIR}/files/nodelist!g" -i ${MYSTIC_DIR}/mutil.ini
|
||||
sed -e 's/\\/\//g' -i ${MYSTIC_DIR}/mide.ini
|
||||
sed -e "s!c:/mystic!${MYSTIC_DIR}!g" -i ${MYSTIC_DIR}/mide.ini
|
||||
msg_ok "Correcting mutil.ini & mide.ini hardcoded paths"
|
||||
|
||||
msg_info "SPlitting mutil.ini into it's parts for later merge"
|
||||
mkdir -p ${MYSTIC_DIR}/mutil.d
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed '/\[General\]/q' | sed '$d' > ${MUTIL_DIR}/README.txt
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[General\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/General
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FIDONET\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FIDONET.NA
|
||||
configarray=('Import_FIDONET.NA')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FILEBONE\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FILEBONE.NA
|
||||
configarray+=('Import_FILEBONE.NA')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_FILEBONE\.NA\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_FILEBONE.NA
|
||||
configarray+=('Export_FILEBONE.NA')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_AREAS\.BBS\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_AREAS.BBS
|
||||
configarray+=('Export_AREAS.BBS')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Export_GOLDED\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Export_GOLDED
|
||||
configarray+=('Export_GOLDED')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_FILES\.BBS\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_FILES.BBS
|
||||
configarray+=('Import_FILES.BBS')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[MassUpload\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/MassUpload
|
||||
configarray+=('MassUpload')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[GenerateTopLists\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/GenerateTopLists
|
||||
configarray+=('GenerateTopLists')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[GenerateAllFiles\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/GenerateAllFiles
|
||||
configarray+=('GenerateAllFiles')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PurgeMessageBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PurgeMessageBases
|
||||
configarray+=('PurgeMessageBases')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackMessageBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackMessageBases
|
||||
configarray+=('PackMessageBases')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PostTextFiles\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PostTextFiles
|
||||
configarray+=('PostTextFiles')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[Import_MessageBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/Import_MessageBase
|
||||
configarray+=('Import_MessageBase')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[ImportEchoMail\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/ImportEchoMail
|
||||
configarray+=('ImportEchoMail')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[ExportEchoMail\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/ExportEchoMail
|
||||
configarray+=('ExportEchoMail')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[MergeNodeLists\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/MergeNodeLists
|
||||
configarray+=('MergeNodeLists')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[FileToss\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/FileToss
|
||||
configarray+=('FileToss')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackFileBases\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackFileBases
|
||||
configarray+=('PackFileBases')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[LinkMessages\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/LinkMessages
|
||||
configarray+=('LinkMessages')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PurgeUserBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PurgeUserBase
|
||||
configarray+=('PurgeUserBase')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[PackUserBase\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/PackUserBase
|
||||
configarray+=('PackUserBase')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[FileSort\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/FileSort
|
||||
configarray+=('FileSort')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[AutoHatch\]/, /\[/p' | sed '$d' > ${MUTIL_DIR}/AutoHatch
|
||||
configarray+=('AutoHatch')
|
||||
cat ${MYSTIC_DIR}/mutil.ini | sed -n '/\[EchoNodeTracker\]/, $p' | sed '$d' > ${MUTIL_DIR}/EchoNodeTracker
|
||||
configarray+=('EchoNodeTracker')
|
||||
msg_ok "SPlitting mutil.ini into it's parts for later merge"
|
||||
|
||||
source $MSTEMPDIR/mystic/mystic/maint-${SCRIPT_VER}.sh
|
||||
source $MSTEMPDIR/mystic/mystic/mailout-${SCRIPT_VER}.sh
|
||||
source $MSTEMPDIR/mystic/mystic/mailin-${SCRIPT_VER}.sh
|
||||
source $MSTEMPDIR/mystic/mystic/importna-${SCRIPT_VER}.sh
|
Loading…
Reference in New Issue
Block a user