orientdb: do not force a specific log service.
This commit is contained in:
parent
c744624153
commit
3370c00882
|
@ -1 +0,0 @@
|
|||
USERGROUP=orientdb:orientdb
|
|
@ -1,55 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Author: TJ Vanderpoel
|
||||
# Licence: MIT
|
||||
# This is a generic 'run' script meant to be linked in a log/ directory
|
||||
# of a runit, daemontools, s6, or similar service.
|
||||
# It requires svlogd available in the path.
|
||||
|
||||
# If the file './conf' exists, it can modify the behavior
|
||||
# of the svlogd in these ways:
|
||||
|
||||
# USERGROUP=user:group (default rsvlog:adm)
|
||||
# SV_LOGDIR=/path/to/log (default `basename $(dirname $PWD)`)
|
||||
# CURRENT_LOG_FILE=filename.log (default 'current')
|
||||
|
||||
set -e
|
||||
if [ $0 != "./run" ];then
|
||||
echo "This script meant to be linked as ./run in a service/log directory only!"
|
||||
exit 1
|
||||
fi
|
||||
curdir=$(basename $(pwd))
|
||||
if [ "$curdir" != "log" ];then
|
||||
echo "This script meant to be run from a service/log directory only!"
|
||||
exit 1
|
||||
fi
|
||||
if [ -f ./conf ];then
|
||||
. ./conf
|
||||
fi
|
||||
if [ "x$SV_LOGDIR" != "x" ];then
|
||||
logdir=$SV_LOGDIR
|
||||
fi
|
||||
if [ -w /var/log ];then
|
||||
user_group=${USERGROUP:-rsvlog:adm}
|
||||
if [ "x$logdir" = "x" ];then
|
||||
logdir=$(basename $(dirname $(pwd)))
|
||||
fi
|
||||
[ -d "/var/log/$logdir" ] || mkdir -p "/var/log/$logdir"
|
||||
[ -L ./main ] || [ -d ./main ] || ln -s "/var/log/$logdir" ./main
|
||||
[ -L ./current ] || ln -s main/current
|
||||
if [ "x$CURRENT_LOG_FILE" != "x" ];then
|
||||
[ -L "/var/log/$logdir/$CURRENT_LOG_FILE" ] || ln -s current "/var/log/$logdir/$CURRENT_LOG_FILE"
|
||||
fi
|
||||
usergroup=$(stat -c "%U:%G" "/var/log/$logdir")
|
||||
if [ "$usergroup" != "$user_group" ];then
|
||||
chown -R $user_group "/var/log/$logdir"
|
||||
fi
|
||||
echo Logging as $user_group to /var/log/$logdir
|
||||
exec chpst -u $user_group svlogd -t ./main
|
||||
else
|
||||
echo Logging in $PWD
|
||||
if [ "x$CURRENT_LOG_FILE" != "x" ];then
|
||||
[ -L "$CURRENT_LOG_FILE" ] || ln -s current "$CURRENT_LOG_FILE"
|
||||
fi
|
||||
exec svlogd -t ./
|
||||
fi
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'orientdb'
|
||||
pkgname=orientdb
|
||||
version=2.1.4
|
||||
revision=2
|
||||
revision=3
|
||||
only_for_archs="i686 x86_64"
|
||||
conf_files="/etc/orientdb/hazelcast.xml"
|
||||
wrksrc="${pkgname}-community-${version}"
|
||||
|
@ -14,12 +14,7 @@ homepage="http://orienttechnologies.com"
|
|||
distfiles="http://www.orientdb.com/download.php?email=unknown@unknown.com&file=orientdb-community-${version}.tar.gz&os=linux>orientdb-community-${version}.tar.gz"
|
||||
checksum=c4ee9e1b93266e1d8f26c700e82b5066a2919d748a9d10f429724c22f670f691
|
||||
system_accounts="orientdb"
|
||||
conf_files="/etc/orientdb/default-distributed-db-config.json
|
||||
/etc/sv/orientdb/log/conf
|
||||
/etc/orientdb/hazelcast.xml
|
||||
/etc/orientdb/orientdb-client-log.properties
|
||||
/etc/orientdb/orientdb-server-config.xml
|
||||
/etc/orientdb/orientdb-server-log.properties"
|
||||
conf_files="/etc/$pkgname/*"
|
||||
|
||||
do_install() {
|
||||
vmkdir 'usr/lib/orientdb'
|
||||
|
|
Loading…
Reference in New Issue