diff --git a/setup/zpush.sh b/setup/zpush.sh index 3b14c047..acab2a12 100755 --- a/setup/zpush.sh +++ b/setup/zpush.sh @@ -41,18 +41,18 @@ if [ $needs_update == 1 ]; then mv /tmp/z-push/*/src /usr/local/lib/z-push rm -rf /tmp/z-push.zip /tmp/z-push - # Create admin and top scripts with PHP_VER - rm -f /usr/sbin/z-push-{admin,top} - echo '#!/bin/bash' > /usr/sbin/z-push-admin - echo php"$PHP_VER" /usr/local/lib/z-push/z-push-admin.php '"$@"' >> /usr/sbin/z-push-admin - chmod 755 /usr/sbin/z-push-admin - echo '#!/bin/bash' > /usr/sbin/z-push-top - echo php"$PHP_VER" /usr/local/lib/z-push/z-push-top.php '"$@"' >> /usr/sbin/z-push-top - chmod 755 /usr/sbin/z-push-top - echo $VERSION > /usr/local/lib/z-push/version fi +# Create admin and top scripts with PHP_VER +rm -f /usr/sbin/z-push-{admin,top} +echo '#!/bin/bash' > /usr/sbin/z-push-admin +echo php"$PHP_VER" /usr/local/lib/z-push/z-push-admin.php '"$@"' >> /usr/sbin/z-push-admin +chmod 755 /usr/sbin/z-push-admin +echo '#!/bin/bash' > /usr/sbin/z-push-top +echo php"$PHP_VER" /usr/local/lib/z-push/z-push-top.php '"$@"' >> /usr/sbin/z-push-top +chmod 755 /usr/sbin/z-push-top + # Configure default config. sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" /usr/local/lib/z-push/config.php sed -i "s/define('BACKEND_PROVIDER', .*/define('BACKEND_PROVIDER', 'BackendCombined');/" /usr/local/lib/z-push/config.php