#!/bin/bash # Shell script which is executed by bash *AFTER* complete installation is done # (*AFTER* postinstall and *AFTER* postupdate). Use with caution and remember, # that all systems may be different! # # Exit code must be 0 if executed successfull. # Exit code 1 gives a warning but continues installation. # Exit code 2 cancels installation. # # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # Will be executed as user "root". # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # # You can use all vars from /etc/environment in this script. # # We add 5 additional arguments when executing this script: # command # # For logging, print to STDOUT. You can use the following tags for showing # different colorized information during plugin installation: # # This was ok!" # This is just for your information." # This is a warning!" # This is an error!" # This is a fail!" # To use important variables from command line use the following code: COMMAND=$0 # Zero argument is shell command PTEMPDIR=$1 # First argument is temp folder during install PSHNAME=$2 # Second argument is Plugin-Name for scipts etc. PDIR=$3 # Third argument is Plugin installation folder PVERSION=$4 # Forth argument is Plugin version #LBHOMEDIR=$5 # Comes from /etc/environment now. Fifth argument is # Base folder of LoxBerry PTEMPPATH=$6 # Sixth argument is full temp path during install (see also $1) # Combine them with /etc/environment PCGI=$LBPCGI/$PDIR PHTML=$LBPHTML/$PDIR PTEMPL=$LBPTEMPL/$PDIR PDATA=$LBPDATA/$PDIR PLOG=$LBPLOG/$PDIR # Note! This is stored on a Ramdisk now! PCONFIG=$LBPCONFIG/$PDIR PSBIN=$LBPSBIN/$PDIR PBIN=$LBPBIN/$PDIR chmod 0755 $PBIN/*.* echo -n " Current working folder is: " pwd echo " Command is: $COMMAND" echo " Temporary folder is: $PTEMPDIR" echo " (Short) Name is: $PSHNAME" echo " Installation folder is: $PDIR" echo " Plugin version is: $PVERSION" echo " Plugin CGI folder is: $PCGI" echo " Plugin HTML folder is: $PHTML" echo " Plugin Template folder is: $PTEMPL" echo " Plugin Data folder is: $PDATA" echo " Plugin Log folder (on RAMDISK!) is: $PLOG" echo " Plugin CONFIG folder is: $PCONFIG" # Exit with Status 0 exit 0