HEX
Server: Apache/2.4.63 (Unix)
System: Linux Synopilou92 4.4.302+ #72806 SMP Mon Jul 21 23:16:00 CST 2025 x86_64
User: pilou92 (1026)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: //var/packages/HyperBackup/scripts/postinst
#!/bin/sh
INITCONF=/var/packages/HyperBackup/target/bin/initconf
UPDATEBACKUP=/var/packages/HyperBackup/target/bin/updatebackup

/bin/touch /var/packages/HyperBackup/tmp/first_start_after_install

if ! $INITCONF HyperBackup; then
	echo "Failed to init conf"
	exit 1
fi

# We can not remove the old config here because the config updater executes later
# will need it.
if ! $UPDATEBACKUP --copy-config-to-package-volume "${SYNOPKG_OLD_PKGVER}"; then
	echo "Failed to move config to package volume"
	exit 1
fi

$UPDATEBACKUP --update-config ${SYNOPKG_PKGVER}
$UPDATEBACKUP --update-last-result ${SYNOPKG_PKGVER}
$UPDATEBACKUP --check-ext3-bad-archive

if ! $UPDATEBACKUP --delete-config-in-root "${SYNOPKG_OLD_PKGVER}"; then
	echo "Failed to remove old config"
fi

exit 0