Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
EndMove committed Mar 28, 2021
0 parents commit 2be5c8f
Show file tree
Hide file tree
Showing 18 changed files with 927 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
6 changes: 6 additions & 0 deletions CONTROL/changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
V: 1.0.0.r02 - D: 2021/03/26
- [FIX]: wrong directory name in the Docker folder.


V: 1.0.0.r01 - D: 2021/03/26
- Openfire 4.6.2 first release.
46 changes: 46 additions & 0 deletions CONTROL/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"general":{
"package":"openfire-docker",
"name":"Openfire",
"version":"1.0.0.r02",
"depends":[
"docker-ce(>=19.03.8.r5)"
],
"developer":"EndMove",
"maintainer":"EndMove",
"email":"contact@endmove.eu",
"website":"https://github.com/EndMove/openfire-docker",
"architecture":"x86-64",
"firmware":"3.4.0"
},
"adm-desktop":{
"app":{
"port":9091,
"protocol":"https",
"type":"custom",
"url":"/"
},
"privilege":{
"accessible":"administrators",
"customizable":true
}
},
"register":{
"share-folder":[
{
"name":"Docker",
"description":"Data and files directory for Docker Apps"
}
],
"boot-priority":{
"start-order":65,
"stop-order":40
},
"port":[
"T5222",
"T7777",
"T9090",
"T9091"
]
}
}
7 changes: 7 additions & 0 deletions CONTROL/description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Openfire is an open source Jabber/XMPP server developed by Ignite Realtime community.
Openfire version: 4.6.2.

Access the panel without SSL: "http://[host]:9090" with SSL: "https://[host]:9091".
The ports available for this version of the application in ADM are: 5222-tcp, 7777-tcp, 9090-tcp, 9091-tcp But all openfire ports are open through the docker container.

The database and configuration files are available in: "/volume1/Docker/Openfire".
Binary file added CONTROL/icon-disable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CONTROL/icon-enable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CONTROL/icon-server-disable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CONTROL/icon-server-enable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CONTROL/icon-server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CONTROL/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions CONTROL/post-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh

echo "openfire-docker Install: post-install"

# Environement variables
OPENFIRE_DATA_PATH="/volume1/Docker/Openfire"
OPENFIRE_CONTAINER=Openfire

# Pull the container image
echo "openfire-docker Install: fetching data"
docker pull endmove/openfire:latest

# Installing creating container
echo "openfire-docker Install: creating container"
docker create -i -t --name=$OPENFIRE_CONTAINER \
--net=host \
-v $OPENFIRE_DATA_PATH/data:/var/lib/openfire \
-v $OPENFIRE_DATA_PATH/log:/var/log/openfire \
--restart unless-stopped \
endmove/openfire:latest

# Starting container
echo "openfire-docker Install: strating container"
docker start $OPENFIRE_CONTAINER

case "$APKG_PKG_STATUS" in
upgrade)
OPENFIRE_IMAGE=$(docker images | grep endmove/openfire | grep none | awk '{print $3}')
# REMOVE old docker image on UPGRADE
echo "openfire-docker Upgrade: removing old docker image"
echo " - $OPENFIRE_IMAGE"
if [ ! -z $OPENFIRE_IMAGE ]; then
docker rmi -f $OPENFIRE_IMAGE
fi
;;
*)
;;
esac

exit 0
3 changes: 3 additions & 0 deletions CONTROL/post-uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "openfire-docker Uninstall: post-uninstall"
3 changes: 3 additions & 0 deletions CONTROL/pre-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo "openfire-docker Install: pre-install"
38 changes: 38 additions & 0 deletions CONTROL/pre-uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh

echo "openfire-docker Uninstall: pre-uninstall"

# Environement variables
OPENFIRE_DATA_PATH="/volume1/Docker/Openfire"
OPENFIRE_CONTAINER=$(docker container ls -a | grep Openfire | awk '{print $1}')

# Force shutdown of the container and delete the image
echo "openfire-docker Uninstall: stoping and removing container"
echo " - $OPENFIRE_CONTAINER"
if [ ! -z $OPENFIRE_CONTAINER ]; then
docker kill $OPENFIRE_CONTAINER
sleep 2
docker rm -f $OPENFIRE_CONTAINER
fi

case "$APKG_PKG_STATUS" in
uninstall)
OPENFIRE_IMAGE=$(docker images | grep endmove/openfire | grep latest | awk '{print $3}')
# REMOVE docker image on uninstalling
echo "openfire-docker Uninstall: removing docker image"
echo " - $OPENFIRE_IMAGE"
if [ ! -z $OPENFIRE_IMAGE ]; then
docker rmi -f $OPENFIRE_IMAGE
fi
;;
upgrade)
# UPDATE copyright and license on upgrading
echo "openfire-docker Upgrade: removing copyright and license file to update them"
rm -f $OPENFIRE_DATA_PATH/copyright
rm -f $OPENFIRE_DATA_PATH/LICENSE
;;
*)
;;
esac

exit 0
33 changes: 33 additions & 0 deletions CONTROL/start-stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh

# Environement variables
OPENFIRE_CONTAINER=Openfire

case "$1" in
start)
# Starting openfire
echo "openfire-docker Start: Starting service..."
docker start $OPENFIRE_CONTAINER
sleep 3
;;
stop)
# Stopping openfire
echo "openfire-docker Stop: Stopping service..."
docker stop $OPENFIRE_CONTAINER
sleep 3
;;
relaod)
# Reloading openfire
echo "openfire-docker Reload: Reloading service..."
docker stop $OPENFIRE_CONTAINER
sleep 6
docker start $OPENFIRE_CONTAINER
sleep 3
;;
*)
echo "usage: $0 {start|stop|reload}"
exit 1
;;
esac

exit 0
Loading

0 comments on commit 2be5c8f

Please sign in to comment.