I am attempting to use the custom-services.d feature to run a service/script. Which is an awesome feature BTW! The script gets picked up and appears to be running according to a ps -aux, however, the script does nothing. I appreciate that you do not offer support for the functionality of custom scripts and reasons for doing so. I am simply looking for an answer as to why the script doesn’t appear to be functioning at the basic level. For the sake of a simple test please see the test script below and it’s setup. Nothing is written to the /tmp/delete.me file. If, however, I execute the script manually from the command line (/config/custom-services.d/my_test_script &) it works and random strings are appended to the /tmp/delete.me file.
root@smokeping:/# ls -alF /config/custom-services.d/ total 12 drwxrwxr-x 2 abc abc 4096 Nov 8 16:53 ./ drwxr-xr-x 6 abc abc 4096 Nov 9 15:43 ../ -rwxrwxr-x 1 abc abc 292 Nov 8 16:53 my_test_script*
root@smokeping:/# ps -aux ... root 272 0.0 0.0 196 4 ? S 15:29 0:00 s6-supervise custom-service-my_test_script
root@smokeping:/# cat /config/custom-services.d/my_test_script #!/usr/bin/with-contenv bash while true do RAND_STR=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1` echo $RAND_STR >> /tmp/delete.me sleep 10 done
root@smokeping:/# cat /tmp/delete.me zTO4ngFIpAkV53bTympa811tWuTI0Vz8 n9ubAKE18DOslTyE9p8sGtLQfytRTSSE OCY4UibAFOQRMLhkQQ0gQLUQHl7HxC5A UwOlvP5mD6loTwsJdrgnvd89BNeEGuI5 ...