Comments (5)
If runsv
is not running then $PREFIX/etc/profile.d/start-services.sh
has not been sourced. Did you open a new shell rather than restarting termux after installing termux-services?
Try source $PREFIX/etc/profile.d/start-services.sh
or restart termux and try again.
If it still does not work please give output of pstree
.
from termux-services.
I really restarted termux. I even rebootet multiple times. I tried sourcing, still doesn't work.
pstree output in tmux:
?─┬─?───bash───tmux: client
└─tmux: server─┬─4*[bash]
└─bash───pstree
pstree output:
?─┬─?───bash───pstree
└─tmux: server───4*[bash]
from termux-services.
What's your output of termux-info
?
Does source $PREFIX/etc/profile.d/start-services.sh
give you an error?
from termux-services.
termux-info
:
Linux localhost 3.4.113 armv71 Android
Device Model: SM-9005
source $PREFIX/etc/profile.d/start-services.sh
gives nothing
Now sv-enable tor
gives:
warning: tor: unable to open supervise/ok: file does not exist
Still just tor
works.
In $PREFIX/etc/profile.d/start-services.sh
export SVDIR=$PREFIX/var/service
export LOGDIR=$PREFIX/var/log
(service-daemon start >/dev/null 2>&1 & )
In $PREFIX/var/service
is a directory, within a run (script), which starts tor (./run
)
from termux-services.
After looking into this a bit (finally) it seem to happen when something goes wrong when runsv starts. If we delete the supervise folder for a running service then sv status
gives this error, but the service continues to run without issues, so it is not quite the same as here.
I can somewhat reliably create the issue for a log service by setting up a service + script, but adding some well-crafted sleep statements in the middle of the script. Running this:
cd $PREFIX/var/service
echo -e "#!/data/data/com.termux/files/usr/bin/bash\necho 1\nsleep 3" > foo/run
chmod u+x foo/run
sleep 2
mkdir foo/log
sleep 1
ln -s $PREFIX/share/termux-services/svlogger $PREFIX/var/service/$sv/log/run
sv status foo
then gives run: foo: (pid 28148) 3s; warning: foo/log: unable to open supervise/ok: file does not exist
occasionally, so I guess there is some sort of race condition happening.
It can be fixed quite easily by killing the runsv process (check PID with ps aux | grep runsv
), it then restarts and creates the supervise folder and everything works. Rebooting the phone also works, but I think that did not work when this situation happened "naturally" after installing with apt? Need to look into it more I guess
from termux-services.
Related Issues (20)
- unable to open supervise/ok HOT 1
- Support for MariaDB/Mysql HOT 3
- Support for OkcAgent HOT 2
- Service in background for a bash script HOT 2
- add sv-status HOT 1
- service command instead of sv HOT 1
- unable to open supervise/ok: file does not exist HOT 7
- [BUG] "sv stop sshd" does not kill sshd process HOT 4
- sv_enable not found HOT 2
- Cannot access service directory HOT 1
- sshd stops working after a period of time
- anyway to list all jobs?
- sv down serviceName - form dpkg configuration step HOT 1
- forking? HOT 2
- All services can't be stopped or disabled HOT 3
- Can't start any service HOT 8
- sshd stops working overnight HOT 6
- Локализация HOT 2
- unable to change to service directory HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from termux-services.