Commit 574ff8c0 authored by Marco Mariani's avatar Marco Mariani

removed checks for zimbra user and sudo calls

parent 11acaf6e
......@@ -14,10 +14,11 @@
# ***** END LICENSE BLOCK *****
#
if [ x`whoami` != xzimbra ]; then
echo Error: must be run as zimbra user
exit 1
fi
## XXX SLAPOS user will not be 'zimbra'
#if [ x`whoami` != xzimbra ]; then
# echo Error: must be run as zimbra user
# exit 1
#fi
source `dirname $0`/zmshutil || exit 1
zmsetvars \
......
......@@ -69,7 +69,7 @@ case "$1" in
if [ "x$2" = "x" ]; then
${zimbra_home}/bin/zmtlsctl > /dev/null 2>&1
fi
sudo ${zimbra_home}/libexec/zmmailboxdmgr status
${zimbra_home}/libexec/zmmailboxdmgr status
if [ $? = 0 ]; then
echo "mailboxd already running."
exit 0
......@@ -105,7 +105,7 @@ case "$1" in
mailboxd_java_options="${mailboxd_java_options} -Dsun.net.inetaddr.ttl=${networkaddress_cache_ttl}"
fi
echo -n "Starting mailboxd..."
sudo ${zimbra_home}/libexec/zmmailboxdmgr start \
${zimbra_home}/libexec/zmmailboxdmgr start \
-Dfile.encoding=UTF-8 ${mailboxd_java_options} ${spnegoJavaOptions} -Xms${javaXms}m \
-Xmx${javaXmx}m -Xmn${javaXmn}m < /dev/null > /dev/null 2>&1
status=$?
......@@ -119,13 +119,13 @@ case "$1" in
'kill'|'stop')
echo -n "Stopping mailboxd..."
sudo ${zimbra_home}/libexec/zmmailboxdmgr status
${zimbra_home}/libexec/zmmailboxdmgr status
if [ $? != 0 ]; then
echo "mailboxd is not running."
exit 0
fi
${zimbra_home}/bin/zmthrdump -i -o ${zimbra_home}/log/stacktrace.$$.$(date +%Y%m%d%H%M%S) 2> /dev/null
sudo ${zimbra_home}/libexec/zmmailboxdmgr stop
${zimbra_home}/libexec/zmmailboxdmgr stop
if [ $? = 0 ]; then
echo "done."
else
......@@ -142,7 +142,7 @@ case "$1" in
'status')
echo -n "mailboxd is "
sudo ${zimbra_home}/libexec/zmmailboxdmgr status
${zimbra_home}/libexec/zmmailboxdmgr status
if [ $? = 0 ]; then
echo "running."
exit 0
......
......@@ -14,12 +14,11 @@
# ***** END LICENSE BLOCK *****
#
if [ x`whoami` != "xzimbra" ]; then
echo "$0 must be run as user zimbra"
exit 1
fi
## XXX SLAPOS user will not be 'zimbra'
# if [ x`whoami` != "xzimbra" ]; then
# echo "$0 must be run as user zimbra"
# exit 1
# fi
source `dirname $0`/zmshutil || exit 1
zmsetvars \
......
......@@ -23,10 +23,11 @@ our %loaded = ();
my $id = getpwuid($<);
chomp $id;
if ($id ne "zimbra") {
print STDERR "Error: must be run as zimbra user\n";
exit (1);
}
## XXX SLAPOS user will not be 'zimbra'
#if ($id ne "zimbra") {
# print STDERR "Error: must be run as zimbra user\n";
# exit (1);
#}
my ($help, $dryrun, $mode);
......
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