Commit 0ad75a1e authored by Marco Mariani's avatar Marco Mariani

zmamavisdctl, zmclamdctl, zmopendkimctl, zmsaslauthdctl,

  zmfreshclamctl, zmnginxctl, zmtrainsa, zmauditswatchctl,
  zmhactl, zmmemcachedctl, zmswatchctl, zmjsprecompile,
  zmloggerinit, zmresetmysqlpassword, zmupdatezco, zmcbpolicydctl: removed hardcoded checks for zimbra user
zmopendkimctl: do not attemp to switch to zimbra user
parent d5e953b3
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
source `dirname $0`/zmshutil || exit 1 source `dirname $0`/zmshutil || exit 1
zmsetvars \ zmsetvars \
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
if [ ! -L "/opt/zimbra/amavisd" ]; then if [ ! -L "/opt/zimbra/amavisd" ]; then
exit 0 exit 0
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
source `dirname $0`/zmshutil || exit 1 source `dirname $0`/zmshutil || exit 1
zmsetvars \ zmsetvars \
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
if [ ! -L "/opt/zimbra/clamav" ]; then if [ ! -L "/opt/zimbra/clamav" ]; then
exit 0 exit 0
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
if [ ! -L "/opt/zimbra/clamav" ]; then if [ ! -L "/opt/zimbra/clamav" ]; then
exit 0 exit 0
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
platform=`/opt/zimbra/libexec/get_plat_tag.sh` platform=`/opt/zimbra/libexec/get_plat_tag.sh`
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
source `dirname $0`/zmshutil || exit 1 source `dirname $0`/zmshutil || exit 1
zmsetvars \ zmsetvars \
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo "Error: must be run as zimbra user" #if [ x`whoami` != xzimbra ]; then
exit 1 # echo "Error: must be run as zimbra user"
fi # exit 1
#fi
source `dirname $0`/zmshutil || exit 1 source `dirname $0`/zmshutil || exit 1
zmsetvars \ zmsetvars \
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
if [ ! -L "/opt/zimbra/opendkim" ]; then if [ ! -L "/opt/zimbra/opendkim" ]; then
exit 0 exit 0
...@@ -68,7 +69,7 @@ start() ...@@ -68,7 +69,7 @@ start()
if [ x$1 = "x" ]; then if [ x$1 = "x" ]; then
rewriteconfig rewriteconfig
fi fi
$odk -x $config -u zimbra $odk -x $config
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "Failed to start opendkim: $?" echo "Failed to start opendkim: $?"
exit 1 exit 1
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
source `dirname $0`/zmshutil || exit 1 source `dirname $0`/zmshutil || exit 1
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
source `dirname $0`/zmshutil || exit 1 source `dirname $0`/zmshutil || exit 1
zmsetvars \ zmsetvars \
......
...@@ -104,10 +104,11 @@ usage() { ...@@ -104,10 +104,11 @@ usage() {
exit 1 exit 1
} }
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
if [ ! -h "/opt/zimbra/amavisd" ]; then if [ ! -h "/opt/zimbra/amavisd" ]; then
echo "Error: SpamAssassin not installed" echo "Error: SpamAssassin not installed"
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
#; ***** END LICENSE BLOCK ***** #; ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
zimbra_home=/opt/zimbra zimbra_home=/opt/zimbra
zimbra_java_home=${zimbra_home}/java zimbra_java_home=${zimbra_home}/java
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
# # XXX SLAPOS must run as current user
if [ x`whoami` != "xzimbra" ]; then #if [ x`whoami` != "xzimbra" ]; then
echo "Error: must be run as user zimbra" # echo "Error: must be run as user zimbra"
exit 1 # exit 1
fi #fi
umask 027 umask 027
source `dirname $0`/../bin/zmshutil || exit 1 source `dirname $0`/../bin/zmshutil || exit 1
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != "xzimbra" ]; then # XXX SLAPOS must run as current user
echo "Error: must be run as user zimbra" #if [ x`whoami` != "xzimbra" ]; then
exit 1 # echo "Error: must be run as user zimbra"
fi # exit 1
#fi
usage() { usage() {
echo "$0 [--help] [--sql_root_pw <password>] [--mysql_memory_percent 30]" echo "$0 [--help] [--sql_root_pw <password>] [--mysql_memory_percent 30]"
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK ***** # ***** END LICENSE BLOCK *****
# #
if [ x`whoami` != xzimbra ]; then # XXX SLAPOS must run as current user
echo Error: must be run as zimbra user #if [ x`whoami` != xzimbra ]; then
exit 1 # echo Error: must be run as zimbra user
fi # exit 1
#fi
source `dirname $0`/../bin/zmshutil || exit 1 source `dirname $0`/../bin/zmshutil || exit 1
zmsetvars zmsetvars
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment