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