Fix missing write permissions on storage for http upload
+ Check for missing basic configuration
This commit is contained in:
19
seqs/ejabberd.sh
Executable file → Normal file
19
seqs/ejabberd.sh
Executable file → Normal file
@@ -37,25 +37,38 @@ step_2() {
|
|||||||
|
|
||||||
exe mv "$toolCertLoc" "${toolCertLoc}.bck"
|
exe mv "$toolCertLoc" "${toolCertLoc}.bck"
|
||||||
exe ln -s "$certLoc" "$toolCertLoc"
|
exe ln -s "$certLoc" "$toolCertLoc"
|
||||||
# for read access to certificate
|
# read access for ejabberd to read certificate
|
||||||
exe chown root:ejabberd "$certRoot"
|
exe chown root:ejabberd "$certRoot"
|
||||||
exe chmod 750 "$certRoot"
|
exe chmod 750 "$certRoot"
|
||||||
}
|
}
|
||||||
|
|
||||||
step_3_info() { echo "Create basic configuration"; }
|
step_3_info() { echo "Create basic configuration"; }
|
||||||
step_3() {
|
step_3() {
|
||||||
|
if [ ! -f $SEQDIR/ejabberd.yml ] ; then
|
||||||
|
addConf -m "$MissingConfEntry" "$toolConfLoc"
|
||||||
|
else
|
||||||
readDomain
|
readDomain
|
||||||
echo -e "\nThis user will be the admin:"
|
echo -e "\nThis user will be the admin:"
|
||||||
readUser
|
readUser
|
||||||
addConf -c "$(cat $SEQDIR/ejabberd.yml)" "$toolConfLoc"
|
addConf -c "$(cat $SEQDIR/ejabberd.yml)" "$toolConfLoc"
|
||||||
saveReturn $?
|
# modify configuration
|
||||||
endReturn
|
|
||||||
exe sed -i "s/mydomain\.eu/${myDomain}/" "$toolConfLoc"
|
exe sed -i "s/mydomain\.eu/${myDomain}/" "$toolConfLoc"
|
||||||
exe sed -i "s/myuser/${myUser}/" "$toolConfLoc"
|
exe sed -i "s/myuser/${myUser}/" "$toolConfLoc"
|
||||||
|
# create storage for http upload
|
||||||
exe mkdir -p "$toolStorageLoc"
|
exe mkdir -p "$toolStorageLoc"
|
||||||
exe chown root:$toolName "$toolStorageLoc"
|
exe chown root:$toolName "$toolStorageLoc"
|
||||||
|
exe chmod 770 "$toolStorageLoc"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MissingConfEntry="\
|
||||||
|
Seq's basic configuration file \"$SEQDIR/ejabberd.yml\" missing.
|
||||||
|
Backup $toolConfLoc and create a configuration manually.
|
||||||
|
|
||||||
|
Some essential settings needed:
|
||||||
|
- Domain
|
||||||
|
- Admin User"
|
||||||
|
|
||||||
step_4_info() { echo "Restart $toolName"; }
|
step_4_info() { echo "Restart $toolName"; }
|
||||||
step_4_alias() { ALIAS="restart"; }
|
step_4_alias() { ALIAS="restart"; }
|
||||||
step_4() {
|
step_4() {
|
||||||
|
Reference in New Issue
Block a user