Closed MichaIng closed 4 years ago
Best would be actually to adjust this based on make BINDIR: https://github.com/hoytech/vmtouch/blob/master/Makefile#L2
Not sure if there is some automated solution via Makefile or Debian packages to adjust such files based on environment variables, else it could be done via postinst script?
Thanks! I don't think we have any way of setting up the DAEMON based on the PREFIX. If somebody would like to add that I'd be happy to merge. :)
@hoytech Probably not the most beautiful solution, but the Debian package adds this postinst script, which could do the adjustment as first step:
root@BuildingRPi:~# cat /var/lib/dpkg/info/vmtouch.postinst
#!/bin/sh
set -e
# Automatically added by dh_installinit/10.7.2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/vmtouch" ]; then
update-rc.d vmtouch defaults >/dev/null
if [ -n "$2" ]; then
_dh_action=restart
else
_dh_action=start
fi
invoke-rc.d vmtouch $_dh_action || exit $?
fi
fi
# End automatically added section
But I have not much experience with Debian package building, and it seems to be an automated part of the debhelper-compat currently: https://buildd.debian.org/status/fetch.php?pkg=vmtouch&arch=amd64&ver=1.3.1-1&stamp=1563455035&raw=0
Anyway, since Ah sorry, build install seems to not install the service,, right?make install
installs the sysvinit service as well, it makes more sense to have this already as part of the make process.
Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947603
Signed-off-by: MichaIng micha@dietpi.com