correct install uninstall commmand

This commit is contained in:
Mario Fetka 2019-09-19 14:35:27 +02:00
parent f158ba99a2
commit 506ee16f3d
6 changed files with 26 additions and 68 deletions

View File

@ -1,5 +1,7 @@
[X86] [X86]
[X86_64]
[COMMON] [COMMON]
PN=name PN=name
VERSION=version VERSION=version

View File

@ -13,37 +13,22 @@ version: 4.0.2
priority: 0 priority: 0
licenseRequired: False licenseRequired: False
productClasses: productClasses:
setupScript: setup32.ins setupScript: setup3264.ins
uninstallScript: uninstall32.ins uninstallScript: uninstall3264.ins
updateScript: updateScript:
alwaysScript: alwaysScript:
onceScript: onceScript:
customScript: customScript:
userLoginScript: userLoginScript:
[ProductProperty]
type: bool
name: desktoplink
description: Show Desktop Link on/off
default: False
[ProductProperty] [ProductProperty]
type: unicode type: unicode
name: custom-post-install name: install_architecture
multivalue: False multivalue: False
editable: True editable: False
description: Define filename for include script in custom directory after installation description: which architecture (32/64 bit) has to be installed
values: ["none"] values: ["32 only", "64 only", "both", "system specific"]
default: ["none"] default: ["system specific"]
[ProductProperty]
type: unicode
name: custom-post-uninstall
multivalue: False
editable: True
description: Define filename for include script in custom directory after uninstallation
values: ["none"]
default: ["none"]
[ProductDependency] [ProductDependency]
action: setup action: setup

View File

@ -7,19 +7,3 @@
# PRODUCT_ID: id of the current product # PRODUCT_ID: id of the current product
# CLIENT_DATA_DIR: directory which contains the installed client data # CLIENT_DATA_DIR: directory which contains the installed client data
# #
TMP_DIR=${CLIENT_DATA_DIR}/../${PRODUCT_ID}.tmp
if [ -d $TMP_DIR ]; then
echo 'Restoring previous directories...'
echo 'Restoring previous custom dir...'
if [ -d $TMP_DIR/custom ]; then
test -e $CLIENT_DATA_DIR/custom && rm -rf $CLIENT_DATA_DIR/custom
echo " moving $TMP_DIR/custom to $CLIENT_DATA_DIR/"
mv $TMP_DIR/custom $CLIENT_DATA_DIR/ || exit 1
fi
fi
echo "Removing temporary files..."
rm -rf $TMP_DIR

View File

@ -7,27 +7,3 @@
# PRODUCT_ID: id of the current product # PRODUCT_ID: id of the current product
# CLIENT_DATA_DIR: directory where client data will be installed # CLIENT_DATA_DIR: directory where client data will be installed
# #
TMP_DIR=${CLIENT_DATA_DIR}/../${PRODUCT_ID}.tmp
if [ -d $TMP_DIR ]; then
echo "Temporary directory $TMP_DIR already exist, aborting!" 1>&2
exit 1
fi
[ ! -d $CLIENT_DATA_DIR ] && mkdir $CLIENT_DATA_DIR
mkdir $TMP_DIR
if [ -d $CLIENT_DATA_DIR ]; then
echo "Saving previous directories..."
for dirname in custom ; do
for path in $CLIENT_DATA_DIR/$dirname; do
if [ -e $path ]; then
echo " moving $path to $TMP_DIR"
mv $path $TMP_DIR/ || exit 1
fi
done
done
fi
exit 0

View File

@ -17,15 +17,27 @@ TYPE="public"
DL_FILE[0]="free-download-manager-logo.png" DL_FILE[0]="free-download-manager-logo.png"
DL_SOURCE[0]="http://cdn.warer.com/media/free-download-manager-logo.png" DL_SOURCE[0]="http://cdn.warer.com/media/free-download-manager-logo.png"
DL_FILE[1]="fdminst-${VERSION}.exe" # replace points, split into array
DL_SOURCE[1]="https://dn3.freedownloadmanager.org/5/5.1-latest/fdm5_x86_setup.exe" a=( ${VERSION//./ } )
DL_FILE[1]="fdm_${VERSION}_x86_setup.exe"
DL_SOURCE[1]="https://dn3.freedownloadmanager.org/${a[0]}/${a[0]}.${a[1]}-latest/fdm${a[0]}_x86_setup.exe"
DL_ARCH[1]="X86" DL_ARCH[1]="X86"
DL_WINST_NAME[1]=InstallExe DL_WINST_NAME[1]=Install32Exe
DL_FILE[2]="fdm_${VERSION}_x64_setup.exe"
DL_SOURCE[2]="https://dn3.freedownloadmanager.org/${a[0]}/${a[0]}.${a[1]}-latest/fdm${a[0]}_x64_setup.exe"
DL_ARCH[2]="X86_64"
DL_WINST_NAME[2]=Install64Exe
# File array index for the image showing while installing the program # File array index for the image showing while installing the program
ICON_DL_INDEX=0 ICON_DL_INDEX=0
OPSI_INI_SECTION[0]="X86" OPSI_INI_SECTION[0]="X86"
OPSI_INI_OPTION[0]="UninstallProg" OPSI_INI_OPTION[0]="UninstallProg32"
OPSI_INI_VALUE[0]="fdm_uninstall.exe" OPSI_INI_VALUE[0]="unins000.exe"
OPSI_INI_SECTION[1]="X86_64"
OPSI_INI_OPTION[1]="UninstallProg64"
OPSI_INI_VALUE[1]="unins000.exe"

View File

@ -1 +0,0 @@
78fc346a81e301a507209a6e141b83b6e6c49b5f /home/mario/.opsi-dist-cache/freedownloadmanager.core-5.1.38/X86/fdminst-5.1.38.exe