Portál AbcLinuxu, 4. května 2025 09:21
/etc/rc.d/flexibee #!/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin FLEXIBEE_PID=/var/run/flexibee.pid FLEXIBEE_USER="winstrom" MYLANG=`echo $LANG | cut -c 1-2` CONFIGFILE=/etc/flexibee/flexibee-server.xml case "$1" in start) ### detect flexibee default configuration file if [ -f /etc/default/flexibee ]; then . /etc/default/flexibee fi ### detect flexibee server mode (if is define) if [ x"$FLEXIBEE_CFG" = x"client" ]; then if [ x"$MYLANG" = x"cs" ]; then echo "FlexiBee je vypnutý. Změňte hodnotu FLEXIBEE_CFG z 'client' na 'local' nebo 'server' v /etc/default/flexibee" else if [ x"$MYLANG" = x"sk" ]; then echo "FlexiBee je vypnutý. Zmeňte hodnotu FLEXIBEE_CFG z 'client' na 'local' alebo 'server' v /etc/default/flexibee" else echo "FlexiBee is disabled. Change FLEXIBEE_CFG from 'client' to 'local' or 'server' in /etc/default/flexibee" fi fi exit 0 fi ### detect postgresql server runing if [ ! -e /var/run/daemons/postgresql ]; then if [ x"$MYLANG" = x"cs" ]; then echo "Neběží postgresql databáze. Spustě jí pomocí /etc/rc.d/postgresql start" else echo "Postgresql database not running, run the database : /etc/rc.d/postgresql start " fi exit 0 fi ### detect flexibee running if [ -e $FLEXIBEE_PID ]; then if [ x"$MYLANG" = x"cs" ]; then echo "Flexibee server je už spuštěn!" else echo "Flexibee server is running!" fi exit 0 fi ### run flexibee server /usr/sbin/flexibee-server ### detect running flexibee server if [ -e $FLEXIBEE_PID ]; then if [ x"$MYLANG" = x"cs" ]; then echo "Flexibee server byl úspěšně spuštěn." else echo "Flexibee server successfully started" fi exit 0 else if [ x"$MYLANG" = x"cs" ]; then echo "Chyba při spouštění flexibee serveru!" else echo "Error when starting flexibee server!" fi fi ;; stop) if [ ! -e $FLEXIBEE_PID ]; then if [ x"$MYLANG" = x"cs" ]; then echo "Chyba : Flexibee server není spuštěn." else echo "Error : Flexibee server is not running" fi exit 0 fi kill `cat $FLEXIBEE_PID` rm -f $FLEXIBEE_PID ;; restart) $0 stop sleep 2 $0 start ;; install) echo "---> 1) Create system user and group : winstrom" echo " useradd --system --home-dir /tmp --no-create-home --user-group --shell /bin/false winstrom" useradd --system --home-dir /tmp --no-create-home --user-group --shell /bin/false winstrom echo "---> 2) Change flexibee connection port from default 5435 to arch linux postgresql port 5432" echo " cat $CONFIGFILE | sed '/port/s/5435/5432/g' > $CONFIGFILE.new" echo " mv $CONFIGFILE.new $CONFIGFILE" cat $CONFIGFILE | sed '/"port"/s/5435/5432/g' > $CONFIGFILE.new mv $CONFIGFILE.new $CONFIGFILE echo "---> 3) Create database role with random secret password : " echo " su - postgres -c CREATE ROLE dba PASSWORD '********' CREATEDB SUPERUSER CREATEROLE INHERIT LOGIN;" ### generate random password pass=`</dev/urandom tr -dc A-Za-z0-9| (head -c $1 > /dev/null 2>&1 || head -c 23)` ### create database role su - postgres -c "psql -c \"CREATE ROLE dba PASSWORD '$pass' CREATEDB SUPERUSER CREATEROLE INHERIT LOGIN;\"" echo "---> 4) The database role password adding to flexibee configuration file $CONFIGFILE" echo " cat $CONFIGFILE | sed '/password/s/7971/**********/g' > $CONFIGFILE.new" echo " mv $CONFIGFILE.new $CONFIGFILE" cat $CONFIGFILE | sed '/password/s/7971/'$pass'/g' > $CONFIGFILE.new mv $CONFIGFILE.new $CONFIGFILE pass=0 echo "---> 4) Change file permission to flexibee configiration file" echo " chmod 600 $CONFIGFILE" echo " chown winstrom $CONFIGFILE" chmod 600 $CONFIGFILE chown winstrom $CONFIGFILE ;; *) echo "usage: $0 {start|stop|restart|install}" esac exit 0Zdar Max
wget -c http://www.flexibee.eu/download/10.14/flexibee-10.14.2.14.tar.gzpoužívat
wget -c http://www.flexibee.eu/download/latest/tgz/Tam bude pak vždy nejnovější verze. S pozdravem Petr Ferschmann
http://www.flexibee.eu/download/latest/deb/ http://www.flexibee.eu/download/latest/rpm/ http://www.flexibee.eu/download/latest/rpm-mdk/ http://www.flexibee.eu/download/latest/exe/ http://www.flexibee.eu/download/latest/dmg/ http://www.flexibee.eu/download/latest/version/ http://www.flexibee.eu/download/latest/linux/ (pro případ, že chci odkaz na Linux, ale nevím který konkrétní balíček)S pozdravem Petr Ferschmann
http://www.flexibee.eu/download/latest.tar.gz
aby se to dalo jednoduše použít ve skriptu, třeba:
wget http://www.flexibee.eu/download/latest.tar.gz
VER=`wget -qO- http://www.flexibee.eu/download/latest/version | cat` BASEVER=`echo $VER |cut -f1,2 -d.` wget -c http://download.flexibee.eu/download/$BASEVER/flexibee-$VER.tar.gzMně třeba zmíněný :
wget -c http://www.flexibee.eu/download/latest/tgz/Nefunguje :-/ a nestáhne se nic. Naproti tomu, když zkusím
wget http://www.flexibee.eu/download/latest/rpm/"Tak se mi sosne zmíněný soubor a má název index.html, takže člověk si stejně musí vytáhnout info o verzi z :
http://www.flexibee.eu/download/latest/versionA poté si název souboru / výsledného balíčku upravit.
wget -c http://www.flexibee.eu/download/latest/tgz/Už je to zpravené. Zkusil jsem to a s tím index.html u RPM problém nemám. On je to pouze redirect (302 Location) takže wget se dozví správný název souboru. A když dám
wget -c http://www.flexibee.eu/download/latest/tgz/ -O file.tgztak mi to zafunguje a zapíše do file.tgz S pozdravem Petr Ferschmann
JAVA_HOME=/opt/java6/jre/ flexibeeA funguje to. Serverová část šlape na java7(ale nemám plně ověřeno, jen základní přihlášení a načtení firmy) a klientská část nikoli, ta jede zatím jen na šestkové řadě.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.