Commit 89c7b203 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Branched before adding clustering support.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches@8124 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6accec57

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

#
# $RCSfile$
# $Revision$
# $Date$
#
#
# Directory where the jar files will be deployed (see the deployjar task)
#
deploy.jar.dir=
#
# Directory where plugin development is done. This is assumed to be the
# root directory:
#
# /home/joeuser/java/myplugins/ <- Point to this directory
# |- fooplugin/
# |- barplugin/
#
plugin.dev.dir=
#
# Path to your Install4j installation. Typically this is c:\Program Files\install4j
# This property is set by default in the build.xml file as c:\Program Files\install4j so
# if you used the standard location you won't need to edit the property below.
#
# installer.install4j.home=
\ No newline at end of file
This diff is collapsed.
openfire (@version@) unstable; urgency=medium
* For full changelog, see http://www.igniterealtime.org/builds/wildfire/docs/latest/changelog.html
-- Jive Software <webmaster@jivesoftware.com> @builddate@
Source: openfire
Section: net
Priority: optional
Maintainer: Jive Software <webmaster@jivesoftware.com>
Build-Depends: debhelper (>= 5), cdbs, patchutils, sun-java5-jdk, ant
Standards-Version: 3.7.2
Package: openfire
Section: net
Priority: optional
Depends: sun-java5-jre
Architecture: all
Description: A high performance XMPP (Jabber) server.
Openfire is an instant messaging server that implements the XMPP
(Jabber) protocol. It features high performance, a robust
administration console, and a full plugin system. The server
is 100% Java.
.
Openfire is a professional Open Source project, led by Jive Software.
This package was debianized by Jive Software
<webmaster@jivesoftware.com> on March 12, 2007.
The source was downloaded from http://www.igniterealtime.org.
Upstream author: Jive Software <webmaster@jivesoftware.com>
This software is copyright (c) 2007 by Jive Software
You are free to distribute this software under the terms of
the GNU General Public License. On Debian systems, the complete
text of the GNU General Public License can be found in the file
'/usr/share/common-licenses/GPL'.
/etc/openfire/openfire.xml
/etc/openfire/security/keystore
/etc/openfire/security/truststore
# Defaults for openfire initscript
# sourced by /etc/init.d/openfire
# installed at /etc/default/openfire by the maintainer scripts
#
# This is a POSIX shell fragment
#
# Additional options that are passed to the Daemon.
DAEMON_OPTS=""
/etc/openfire
/usr/share/openfire/lib
/usr/share/openfire/resources
/var/log/openfire
/var/lib/openfire/embedded-db
#!/bin/sh
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
#
JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
PATH=/sbin:/bin:/usr/sbin:/usr/bin:$JAVA_HOME/bin
DAEMON=$JAVA_HOME/bin/java
NAME=openfire
DESC=openfire
DAEMON_DIR=/usr/share/openfire
DAEMON_LIB=${DAEMON_DIR}/lib
test -x $DAEMON || exit 0
# Include openfire defaults if available
if [ -f /etc/default/openfire ] ; then
. /etc/default/openfire
fi
DAEMON_OPTS="-server -DopenfireHome=${DAEMON_DIR} \
-Dopenfire.lib.dir=${DAEMON_LIB} -classpath ${DAEMON_LIB}/startup.jar\
-jar ${DAEMON_LIB}/startup.jar $DAEMON_OPTS"
#set -e
#Helper functions
start() {
start-stop-daemon --start --quiet --background --make-pidfile \
--pidfile /var/run/$NAME.pid --chuid openfire:openfire \
--exec $DAEMON -- $DAEMON_OPTS
}
stop() {
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON --retry 4
}
case "$1" in
start)
echo -n "Starting $DESC: "
start
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
stop
echo "$NAME."
;;
restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $DESC: "
#set +e
stop
#set -e
#sleep 1
start
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
/etc/openfire /usr/share/openfire/conf
/etc/openfire/security /usr/share/openfire/resources/security
/var/lib/openfire/embedded-db /usr/share/openfire/embedded-db
/var/lib/openfire/plugins /usr/share/openfire/plugins
#! /bin/sh
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#
# quoting from the policy:
# Any necessary prompting should almost always be confined to the
# post-installation script, and should be protected with a conditional
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
case "$1" in
configure)
if ! getent passwd openfire >/dev/null; then
adduser --disabled-password --quiet --system \
--home /var/lib/openfire \
--gecos "Openfire XMPP server" --group openfire
fi
mkdir -p /var/log/openfire
mkdir -p /var/lib/openfire/embedded-db
chown -R openfire:openfire /var/lib/openfire
chown -R openfire:openfire /var/log/openfire
chown -R openfire:openfire /etc/openfire
chmod -R o-rwx /etc/openfire
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# postrm script for openfire
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge)
rm -Rf /etc/openfire
rm -Rf /var/lib/openfire
rm -Rf /var/log/openfire
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
diff -Nur openfire-3.3.0/src/conf/openfire.xml openfire-3.3.0.new/src/conf/openfire.xml
--- openfire-3.3.0/src/conf/openfire.xml 2007-04-12 11:00:10.000000000 +0200
+++ openfire-3.3.0.new/src/conf/openfire.xml 2007-04-12 12:34:04.000000000 +0200
@@ -50,4 +50,9 @@
<interface></interface>
</network>
-->
-</jive>
\ Kein Zeilenumbruch am Dateiende.
+
+ <!-- Set the log directory to /var/log/openfire for the debian package. -->
+ <log>
+ <directory>/var/log/openfire</directory>
+ </log>
+</jive>
diff -Nur openfire-3.3.0/src/java/org/jivesoftware/util/JiveGlobals.java openfire-3.3.0.new/src/java/org/jivesoftware/util/JiveGlobals.java
--- openfire-3.3.0/src/java/org/jivesoftware/util/JiveGlobals.java 2007-04-12 12:36:59.000000000 +0200
+++ openfire-3.3.0.new/src/java/org/jivesoftware/util/JiveGlobals.java 2007-04-12 12:38:40.000000000 +0200
@@ -243,10 +243,10 @@
if (!mh.exists()) {
Log.error("Error - the specified home directory does not exist (" + pathname + ")");
}
- else if (!mh.canRead() || !mh.canWrite()) {
+ else if (!mh.canRead()) {
Log.error("Error - the user running this application can not read " +
- "and write to the specified home directory (" + pathname + "). " +
- "Please grant the executing user read and write permissions.");
+ "to the specified home directory (" + pathname + "). " +
+ "Please grant the executing user read permissions.");
}
else {
home = pathname;
/var/log/openfire
# move the
/etc/openfire
\ No newline at end of file
#!/usr/bin/make -f
#export DH_VERBOSE=1
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk
DEST := $(CURDIR)/debian/openfire
TARGET := $(CURDIR)/target/openfire
OPENFIRE := $(DEST)/usr/share/openfire
ETCDIR := $(DEST)/etc/openfire
LOGDIR := $(DEST)/var/log/openfire
VARDIR := $(DEST)/var/lib/openfire
JAVA_HOME := /usr/lib/jvm/java-1.5.0-sun
DEB_ANT_BUILDFILE := build/build.xml
DEB_ANT_CLEAN_TARGET := clean
install/openfire::
cp $(TARGET)/lib/*.jar $(OPENFIRE)/lib/
cp -r $(TARGET)/resources/database $(OPENFIRE)/resources/database
cp $(TARGET)/conf/openfire.xml $(ETCDIR)
cp -r $(TARGET)/resources/security $(ETCDIR)/security
cp -r $(TARGET)/plugins $(VARDIR)/plugins
This diff is collapsed.
Name | Version
---------------------------------------------
ant.jar | Jetty 6.1.0 (1.6.5)
ant-contrib.jar | 1.0b1
ant-subdirtask.jar | Revision 1.4 (CVS)
bouncycastle.jar | JDK 1.5, 135 (bcprov-jdk15-135.jar)
commons-logging.jar | Jetty 5.1.10
commons-el.jar | Jetty 6.0.1 (1.0)
commons-httpclient.jar | 3.0
commons-codec.jar | 1.3
dom4j.jar | 1.6.1
dbutil.jar | Jive Code, no release version.
hsqldb.jar | 1.8.0.5
jetty.jar | Jetty 6.1.0
jetty-util.jar | Jetty 6.1.0
jasper-compiler.jar | Jetty 6.1.0 (5.5.15)
jasper-runtime.jar | Jetty 6.1.0 (5.5.15)
jaxen.jar | 1.1 beta 4 (from DOM4J 1.6.1)
junit.jar | 3.8.1
jdic.jar | 0.9.1 (for windows only)
jstl.jar | Jakarta standard taglib 1.1.2
jmdns.jar | PRE 1.0, patched
jsp-api.jar | Jetty 6.0.1 (2.0)
jtds.jar | 1.2
jzlib.jar | 1.0.7
mail.jar | 1.4.0 (JavaMail)
mina-core-1.2.0.jar | https://svn.apache.org/repos/asf/mina/branches/1.1
mina-filter-compression-1.2.0.jar | https://svn.apache.org/repos/asf/mina/branches/1.1
mina-filter-ssl-1.2.0.jar | https://svn.apache.org/repos/asf/mina/branches/1.1
mysql.jar | 3.1.13
pack200task.jar | August 5, 2004
postgres.jar | 8.1-404 JDBC 3
servlet.jar | Jetty 6.1.0 (2.5)
shaj.jar | 0.5
sitemesh.jar | 2.2.1
standard.jar | Jakarta standard taglib 1.1.2
whack.jar | March-03-2006
xmltask.jar | 1.11
xpp3.jar | XPP_3 1.1.4c
\ No newline at end of file
This diff is collapsed.
B/* Localized versions of Info.plist keys */ B/* Localized versions of Info.plist keys */
{
IBClasses = (
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{CLASS = NSObject; LANGUAGE = ObjC; },
{
CLASS = NSPreferencePane;
LANGUAGE = ObjC;
OUTLETS = {
"_firstKeyView" = id;
"_initialKeyView" = id;
"_lastKeyView" = id;
"_window" = id;
};
SUPERCLASS = NSObject;
},
{CLASS = SFAuthorizationView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{CLASS = WilfireStartStop; LANGUAGE = ObjC; SUPERCLASS = NSButton; },
{
ACTIONS = {openAdminInterface = id; toggleAutoStart = id; toggleServer = id; };
CLASS = wildfirePrefPane;
LANGUAGE = ObjC;
OUTLETS = {
authView = SFAuthorizationView;
autoStartCheckbox = NSButton;
startButton = NSButton;
statusDescription = NSTextField;
statusMessage = NSTextField;
statusProgress = NSProgressIndicator;
viewAdminButton = NSButton;
};
SUPERCLASS = NSPreferencePane;
}
);
IBVersion = 1;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>35 145 481 349 0 0 1280 778 </string>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
<integer>12</integer>
</array>
<key>IBSystem Version</key>
<string>8P2137</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Openfire</string>
<key>CFBundleIdentifier</key>
<string>com.jivesoftware.openfire</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>openfirePrefPane</string>
<key>NSPrefPaneIconFile</key>
<string>openfire-logo-notext.tif</string>
<key>NSPrefPaneIconLabel</key>
<string>Openfire</string>
<key>NSPrincipalClass</key>
<string>openfirePrefPane</string>
</dict>
</plist>
#include <unistd.h>
#include <stdbool.h>
#include <CoreFoundation/CoreFoundation.h>
static void CFQRelease(CFTypeRef cf)
// A version of CFRelease that's tolerant of NULL.
{
if (cf != NULL) {
CFRelease(cf);
}
}
static int GetPathToSelf(char **pathToSelfPtr)
// A drop-in replacement for GetPathToSelf() from MoreAuthSample's MoreSecurity.c,
// implemented using CoreFoundation. From CocoaDev.com
{
int err = 0;
assert( pathToSelfPtr != NULL);
assert(*pathToSelfPtr == NULL);
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef executableURL = NULL;
CFStringRef pathStringRef = NULL;
char *path = NULL;
if (mainBundle != NULL) {
executableURL = CFBundleCopyExecutableURL(mainBundle);
if (executableURL != NULL) {
pathStringRef = CFURLCopyFileSystemPath(executableURL, kCFURLPOSIXPathStyle);
if (pathStringRef != NULL) {
CFIndex pathSize = CFStringGetLength(pathStringRef) + 1;
path = (char *)calloc(pathSize,1);
if (path != NULL) {
Boolean gotCString = CFStringGetCString(pathStringRef, path, pathSize, kCFStringEncodingUTF8);
if (!gotCString) {
free(path);
path = NULL;
}
}
}
}
}
*pathToSelfPtr = path;
// Do the CF memory management.
CFQRelease(executableURL);
CFQRelease(pathStringRef);
assert(*pathToSelfPtr != NULL);
if (*pathToSelfPtr == NULL)
{
err = -1;
}
return err;
}
static bool openfireIsRunning()
{
FILE *ps;
char buff[1024];
if((ps=popen("/bin/ps auxww | fgrep -v 'fgrep' | fgrep openfire/lib/startup.jar", "r")) == NULL)
{
return false;
}
else
{
bool running = false;
if(fgets(buff, 1024, ps)) {
running = true;
}
pclose(ps);
return running;
}
}
static void toggleStartOpenfireAtBoot()
{
CFURLRef propFile = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,
CFSTR("/Library/LaunchDaemons/org.jivesoftware.openfire.plist"),
kCFURLPOSIXPathStyle,
false);
CFDataRef xmlData;
CFURLCreateDataAndPropertiesFromResource (kCFAllocatorDefault,
propFile,
&xmlData,
NULL,
NULL,
NULL);
CFPropertyListRef props = CFPropertyListCreateFromXMLData(kCFAllocatorDefault,
xmlData,
kCFPropertyListMutableContainersAndLeaves,
NULL);
if(CFGetTypeID(props) == CFDictionaryGetTypeID()) {
CFMutableDictionaryRef propsDict = (CFMutableDictionaryRef)props;
CFBooleanRef currentValue = CFDictionaryGetValue(propsDict,CFSTR("RunAtLoad"));
CFDictionaryReplaceValue(propsDict, CFSTR("RunAtLoad"), ((currentValue == kCFBooleanTrue) ? kCFBooleanFalse : kCFBooleanTrue));
CFQRelease(xmlData);
xmlData = CFPropertyListCreateXMLData(kCFAllocatorDefault,(CFPropertyListRef)propsDict);
CFURLWriteDataAndPropertiesToResource(propFile,xmlData,NULL,NULL);
}
CFQRelease(props);
CFQRelease(xmlData);
CFQRelease(propFile);
}
static void toggleOpenfire()
{
char *args[4];
args[0] = "launchctl";
if(openfireIsRunning())
args[1] = "unload";
else
args[1] = "load";
args[2] = "/Library/LaunchDaemons/org.jivesoftware.openfire.plist";
args[3] = NULL;
execv("/bin/launchctl", args);
}
int main(int inArgsCount, char * const inArgs[])
{
char* selfPath = NULL;
int err = GetPathToSelf(&selfPath);
const char* correctPath = "/Library/PreferencePanes/Openfire.prefPane/Contents/MacOS/HelperTool";
if(err == 0 && strncmp(correctPath, selfPath, strlen(correctPath)) == 0) {
setuid(0);
if(inArgs[1] && strlen(inArgs[1]) == strlen("boot") && strncmp("boot", inArgs[1], strlen("boot")) == 0) {
toggleStartOpenfireAtBoot();
} else {
toggleOpenfire();
}
}
return 1;
}
\ No newline at end of file
//
// openfirePrefPane.h
// Preference panel for Openfire
//
// Created by Daniel Henninger on 7/7/06.
// Copyright (c) 2006 Jive Software. All rights reserved.
//
// Concept taken from MySQL preference panel, as well as some borrowed code.
//
#import <PreferencePanes/PreferencePanes.h>
#import <Security/Security.h>
#import <SecurityInterface/SFAuthorizationView.h>
#include <unistd.h>
// 'ps' command to use to check for running openfire daemon
char *pscmd = "/bin/ps auxww | fgrep -v 'fgrep' | fgrep openfire/lib/startup.jar";
// The path to the plist file
NSString *plistPath = @"/Library/LaunchDaemons/org.jivesoftware.openfire.plist";
@interface openfirePrefPane : NSPreferencePane
{
IBOutlet NSButton *startButton;
IBOutlet NSButton *autoStartCheckbox;
IBOutlet NSButton *viewAdminButton;
IBOutlet NSTextField *statusMessage;
IBOutlet NSTextField *statusDescription;
IBOutlet NSProgressIndicator *statusProgress;
IBOutlet SFAuthorizationView *authView;
NSTimer *statusTimer;
}
- (IBAction)toggleServer:(id)sender;
- (IBAction)toggleAutoStart:(id)sender;
- (IBAction)openAdminInterface:(id)sender;
- (void)mainViewDidLoad;
- (void)updateStatus;
- (void)startServer;
- (void)stopServer;
- (void)checkStatus;
- (BOOL)isRunning;
@end
//
// openfirePrefPane.m
// Preference panel for Openfire
//
// Created by Daniel Henninger on 7/7/06.
// Copyright (c) 2006 Jive Software. All rights reserved.
//
// Concept taken from MySQL preference panel, as well as some borrowed code.
//
#import <Security/Security.h>
#import <CoreFoundation/CoreFoundation.h>
#import "openfirePrefPane.h"
@implementation openfirePrefPane
- (void)mainViewDidLoad
{
AuthorizationItem authItems[1]; // we only want to get authorization for one command
authItems[0].name = kAuthorizationRightExecute; // we want the right to execute
char *cmd = [[[NSBundle bundleForClass:[self class]] pathForAuxiliaryExecutable:@"HelperTool"] fileSystemRepresentation];
authItems[0].value = cmd; // the path to the helper tool
authItems[0].valueLength = strlen(cmd); // length of the command
authItems[0].flags = 0; // no extra flags
AuthorizationRights authRights;
authRights.count = 1; // we have one item
authRights.items = authItems; // here is the values for our item
[authView setAuthorizationRights:&authRights];
[authView setAutoupdate:YES];
[authView setDelegate:self];
[authView updateStatus:self];
[statusProgress setStyle:NSProgressIndicatorSpinningStyle];
[statusProgress setDisplayedWhenStopped:NO];
[self updateStatus];
}
- (BOOL)isRunning
{
FILE *ps;
char buff[1024];
if((ps=popen(pscmd, "r")) == NULL)
{
// There was an error opening the pipe. Alert the user.
NSBeginAlertSheet(
@"Error!",
@"OK",
nil,
nil,
[NSApp mainWindow],
self,
nil,
nil,
self,
@"An error occured while detecting a running Openfire process.",
nil);
return NO;
}
else
{
BOOL running = NO;
if(fgets(buff, 1024, ps)) {
running = YES;
printf(buff);
}
pclose(ps);
return running;
}
}
- (IBAction)openAdminInterface:(id)sender
{
NSString *stringURL = @"http://localhost:9090/";
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:stringURL]];
}
- (IBAction)toggleAutoStart:(id)sender
{
char *args[2];
args[0] = "boot";
args[1] = NULL;
OSStatus ourStatus = AuthorizationExecuteWithPrivileges([[authView authorization] authorizationRef],
[authView authorizationRights]->items[0].value,
kAuthorizationFlagDefaults, args, NULL);
if(ourStatus != errAuthorizationSuccess)
{
// alert user the startup has failed
NSBeginAlertSheet(
@"Error!",
@"OK",
nil,
nil,
[NSApp mainWindow],
self,
nil,
nil,
self,
@"Could not start the Openfire server.",
nil);
[statusTimer invalidate];
[self checkStatus];
}
[self updateStatus];
}
- (IBAction)toggleServer:(id)sender
{
[statusMessage setHidden:YES];
[statusProgress startAnimation:self];
[startButton setEnabled:NO];
if(![self isRunning])
{
[self startServer];
statusTimer = [NSTimer scheduledTimerWithTimeInterval:4 target:self
selector:@selector(checkStatus) userInfo:nil repeats:NO];
}
else
{
[self stopServer];
statusTimer = [NSTimer scheduledTimerWithTimeInterval:4 target:self
selector:@selector(checkStatus) userInfo:nil repeats:NO];
}
[self updateStatus];
}
- (void)checkStatus
{
[statusProgress stopAnimation:self];
[statusMessage setHidden:NO];
[startButton setEnabled:YES];
[self updateStatus];
}
- (void)updateStatus
{
if ([self isRunning] == NO)
{
[statusMessage setStringValue:@"Stopped"];
[statusMessage setTextColor:[NSColor redColor]];
[statusDescription setStringValue:@"The server may take a few seconds to start up."];
[startButton setTitle:@"Start Openfire"];
[viewAdminButton setEnabled:NO];
}
else
{
[statusMessage setStringValue:@"Running"];
[statusMessage setTextColor:[NSColor greenColor]];
[statusDescription setStringValue:@"The server may take a few seconds to stop."];
[startButton setTitle:@"Stop Openfire"];
[viewAdminButton setEnabled:YES];
}
BOOL isStartingAtBoot = [[[NSMutableDictionary dictionaryWithContentsOfFile:plistPath] objectForKey:@"RunAtLoad"] boolValue];
[autoStartCheckbox setState:(isStartingAtBoot ? NSOnState : NSOffState)];
}
- (void)startServer
{
char *args[0];
args[1] = NULL;
OSStatus ourStatus = AuthorizationExecuteWithPrivileges([[authView authorization] authorizationRef],
[authView authorizationRights]->items[0].value,
kAuthorizationFlagDefaults, args, NULL);
// wait for the server to start
if(ourStatus != errAuthorizationSuccess)
{
// alert user the startup has failed
NSBeginAlertSheet(
@"Error!",
@"OK",
nil,
nil,
[NSApp mainWindow],
self,
nil,
nil,
self,
@"Could not start the Openfire server.",
nil);
[statusTimer invalidate];
[self checkStatus];
}
}
- (void) stopServer
{
char *args[1];
args[0] = NULL;
OSStatus ourStatus = AuthorizationExecuteWithPrivileges([[authView authorization] authorizationRef],
[authView authorizationRights]->items[0].value,
kAuthorizationFlagDefaults, args, NULL);
if(ourStatus != errAuthorizationSuccess)
{
// alert user the startup has failed
NSBeginAlertSheet(
@"Error!",
@"OK",
nil,
nil,
[NSApp mainWindow],
self,
nil,
nil,
self,
@"Could not stop the Openfire server.",
nil);
[statusTimer invalidate];
[self checkStatus];
}
}
@end
//
// Prefix header for all source files of the 'wildfirePrefPane' target in the 'wildfirePrefPane' project.
//
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#endif
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>EnvironmentVariables</key>
<dict>
<key>WILDFIRE_HOME</key>
<string>/usr/local/wildfire/</string>
</dict>
<key>Label</key>
<string>org.jivesoftware.openfire</string>
<key>OnDemand</key>
<false/>
<key>Program</key>
<string>/usr/local/openfire/bin/extra/openfire-launchd-wrapper.sh</string>
<key>RunAtLoad</key>
<false/>
<key>ServiceDescription</key>
<string>Openfire</string>
<key>StandardErrorPath</key>
<string>/usr/local/openfire/logs/launchd.stderr</string>
<key>StandardOutPath</key>
<string>/usr/local/openfire/logs/launchd.stdout</string>
<key>UserName</key>
<string>openfire</string>
<key>WorkingDirectory</key>
<string>/usr/local/openfire/lib</string>
</dict>
</plist>
#!/bin/sh
OPENFIRE_HOME=/usr/local/openfire/
OPENFIRE_GID=`cat /private/tmp/openfiregid`
rm /private/tmp/openfiregid
chown -R openfire $OPENFIRE_HOME
chgrp -R $OPENFIRE_GID $OPENFIRE_HOME
/bin/launchctl load /Library/LaunchDaemons/org.jivesoftware.openfire.plist
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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