I have created a simple package using this guide, but I can't run the script inside it.
There is a folder named mypack
, which includes /usr/bin/myscript.sh
with some command in it (let's say it just echoes a message like "Hello World"), and a folder named DEBIAN
with a control
file with this text inside:
Package: mypack
Version: 1.0-1
Maintainer: Alex
Architecture: all
Section: misc
Description: echo me
I built and installed it using dpkg-deb --build mypack
; dpkg -i mypack.deb
as the guide says.
Finally, when I wanted to run the script script to see if it is works, I could not. I have tried:
myscript
(returnsmyscript: command not found
)myscript.sh
(returnsbash: /usr/bin/myscript.sh: Permission denied
)sudo myscript.sh
(returnssudo: myscript.sh: command not found
)mypack myscript
andmypack myscript.sh
(both returnmypack: command not found
)
How can I execute it then, so it actually works, or am I missing some important steps, which doesn't let me run the script?
ls -la /usr/bin/myscript.sh
?