From: <wda...@us...> - 2013-03-27 14:29:11
|
Revision: 9141 http://sourceforge.net/p/oorexx/code-0/9141 Author: wdashley Date: 2013-03-27 14:29:09 +0000 (Wed, 27 Mar 2013) Log Message: ----------- Add support for debian style builds to ooRexx. Modified Paths: -------------- main/trunk/platform/unix/debian/postinst.in main/trunk/platform/unix/debian/prerm Modified: main/trunk/platform/unix/debian/postinst.in =================================================================== --- main/trunk/platform/unix/debian/postinst.in 2013-03-26 17:33:01 UTC (rev 9140) +++ main/trunk/platform/unix/debian/postinst.in 2013-03-27 14:29:09 UTC (rev 9141) @@ -89,11 +89,20 @@ ln -sf ${data_dir}/rexxtry.rex ${bin_dir}/rexxtry.rex # Debian specific set up for rxapid -cp ${bin_dir}/rxapid /etc/init.d -update-rc.d rxapid start 89 2 3 4 5 . stop 89 0 1 6 . > /dev/null 2>&1 -# Add the /usr/lib/ooRexx subdir to the ld.conf -echo "${libdir}/ooRexx\n" > /etc/ld.so.conf.d/ooRexx.conf -ldconfig +if [ -x /usr/bin/systemctl ] || [ -x /usr/sbin/systemctl ]; then + ln -sf ${data_dir}/ooRexx/rxapid.service /etc/systemd/system/rxapid.service + echo ${lib_dir}/ooRexx > /etc/ld.so.conf.d/ooRexx.conf + ldconfig + systemctl start rxapid.service +else + cp ${bin_dir}/rxapid /etc/init.d + update-rc.d rxapid start 89 2 3 4 5 . stop 89 0 1 6 . > /dev/null 2>&1 + # Add the /usr/lib/ooRexx subdir to the ld.conf + echo "${libdir}/ooRexx\n" > /etc/ld.so.conf.d/ooRexx.conf + ldconfig + /etc/init.d/rxapid start +fi -/etc/init.d/rxapid start + + Modified: main/trunk/platform/unix/debian/prerm =================================================================== --- main/trunk/platform/unix/debian/prerm 2013-03-26 17:33:01 UTC (rev 9140) +++ main/trunk/platform/unix/debian/prerm 2013-03-27 14:29:09 UTC (rev 9141) @@ -71,12 +71,15 @@ rm -rf /usr/share/ooRexx # Debian specific removal of rxapid -if [ -e /etc/init.d/rxapid ]; then - /etc/init.d/rxapid stop +if [ -x /usr/bin/systemctl ] || [ -x /usr/sbin/systemctl ]; then + systemctl stop rxapid.service + rm /etc/systemd/system/rxapid.service +else + if [ -e /etc/init.d/rxapid ]; then + /etc/init.d/rxapid stop + fi + rm -f /etc/init.d/rxapid + update-rc.d rxapid remove + rm -f /etc/ld.so.conf.d/ooRexx.conf fi -rm -f /etc/init.d/rxapid -update-rc.d rxapid remove -# Remove the ld ooRexx.conf file -rm -f /etc/ld.so.conf.d/ooRexx.conf - |