mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
improved ioncube package specs
This commit is contained in:
parent
3fbd3014c7
commit
3615b38fbf
6 changed files with 54 additions and 8 deletions
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Run triggers only on updates
|
# Run triggers only on updates
|
||||||
if [ -e /usr/local/vesta/ioncube/add_ioncube.sh ]; then
|
if [ -e /usr/local/vesta/ioncube/ioncube.sh ]; then
|
||||||
/usr/local/vesta/ioncube/add_ioncube.sh
|
/usr/local/vesta/ioncube/ioncube.sh add
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
8
src/deb/ioncube/prerm
Executable file
8
src/deb/ioncube/prerm
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Run triggers only on updates
|
||||||
|
if [ -e /usr/local/vesta/ioncube/ioncube.sh ]; then
|
||||||
|
/usr/local/vesta/ioncube/ioncube.sh delete
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
8
src/deb/php/postinst
Executable file
8
src/deb/php/postinst
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Run triggers only on updates
|
||||||
|
if [ -e /usr/local/vesta/ioncube/ioncube.sh ]; then
|
||||||
|
/usr/local/vesta/ioncube/ioncube.sh add
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
|
@ -1,13 +1,28 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
action=${1-add}
|
||||||
VESTA='/usr/local/vesta'
|
VESTA='/usr/local/vesta'
|
||||||
ioncube="ioncube_loader_lin_5.6.so"
|
ioncube="ioncube_loader_lin_5.6.so"
|
||||||
php='/usr/local/vesta/php/lib/php.ini'
|
php='/usr/local/vesta/php/lib/php.ini'
|
||||||
|
|
||||||
# Check if extention is enabled
|
if [ ! -e "$php" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "$VESTA/ioncube/$ioncube" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$action" = 'install' ]; then
|
||||||
if [ -z "$(grep $ioncube $php |grep -v ';')" ]; then
|
if [ -z "$(grep $ioncube $php |grep -v ';')" ]; then
|
||||||
echo "zend_extension = '$VESTA/ioncube/$ioncube'" >> $php
|
echo "zend_extension = '$VESTA/ioncube/$ioncube'" >> $php
|
||||||
/etc/init.d/vesta restart
|
/etc/init.d/vesta restart
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if [ ! -z "$(grep $ioncube $php |grep -v ';')" ]; then
|
||||||
|
sed -i "/$ioncube/d" $php
|
||||||
|
/etc/init.d/vesta restart
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -30,10 +30,18 @@ rm -rf %{buildroot}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
if [ -e /usr/local/vesta/ioncube/add_ioncube.sh ]; then
|
if [ -e /usr/local/vesta/ioncube/ioncube.sh ]; then
|
||||||
/usr/local/vesta/ioncube/add_ioncube.sh
|
/usr/local/vesta/ioncube/ioncube.sh add
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
if [ -e /usr/local/vesta/ioncube/ioncube.sh ]; then
|
||||||
|
/usr/local/vesta/ioncube/ioncube.sh delete
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{_vestadir}
|
%{_vestadir}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,13 @@ rm -rf $RPM_BUILD_ROOT/.lock
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%post
|
||||||
|
if [ $1 -eq 1 ]; then
|
||||||
|
if [ -e /usr/local/vesta/ioncube/ioncube.sh ]; then
|
||||||
|
/usr/local/vesta/ioncube/ioncube.sh add
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
if [ -e "/var/run/vesta-php.pid" ]; then
|
if [ -e "/var/run/vesta-php.pid" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue