1
0
Fork 0

changed MacOS X postinstall

This commit is contained in:
a-brandt 2012-11-20 15:33:42 +01:00
parent 283f0cd2d0
commit f42ceed457
1 changed files with 4 additions and 3 deletions

View File

@ -68,12 +68,13 @@ f 0755 ${rusr} ${rgrp} /Library/LaunchDaemons/org.arangodb.plist.template ${proj
%postinstall <<EOF
sed -e 's%@BINARY@%${sbindir}/arangod-${version}%g' -e 's%@CONFIGDIR@%/etc/arangodb%g' /Library/LaunchDaemons/org.arangodb.plist.template > /Library/LaunchDaemons/org.arangodb.plist
launchctl unload /Library/LaunchDaemons/org.arangodb.plist
launchctl load /Library/LaunchDaemons/org.arangodb.plist
if [ "`find ${data_dir}/arangodb -type d -name 'collection-*'`" == "" ] ; then
${bindir}/arango-upgrade --database.directory "${data_dir}/arangodb" --uid ${susr}
if [ "`/usr/bin/find ${data_dir}/arangodb -type d -name 'collection-*'`" == "" ] ; then
${bindir}/arango-upgrade --database.directory "${data_dir}/arangodb"
fi
launchctl load /Library/LaunchDaemons/org.arangodb.plist
EOF
%preremove <<EOF