I have a script (nginx-sb-setup.sh) inside of my deb package in usr/local/bin directory.
During postinst, I want to copy this usr/local/bin/nginx-sb-setup.sh which is inside of my deb package to /usr/local/bin.
I have learned that dpkg -i doesn't run in the same folder as the deb file. When I gave pwd in postinst, I have found that it runs in /.
And I unable to properly link the file in such way to successfully copy it to my target location.
During install, I get error saying,
cp: cannot stat 'usr/local/bin/nginx-sb-setup.sh': No such file or directory
Please help.
.debfile, without exceptions I rundpkg -i filename.debin the same folder the.debfile is in. I've not yet had to copy any files from inside the.debpackage anywhere. Then again I never have.debfiles in anybindirectory either. – Peregrino69 Apr 10 '23 at 07:37.debpackage anyway and why? Ngnix.org has clear installation instructions which don't involve downloading separate packages. Following them I just now installed it successfully on a Debian 11 system. – Peregrino69 Apr 10 '23 at 07:45installfile. My bad. – Hasan Apr 11 '23 at 04:46