init.d

How can I run a service inside a docker container to get feed from a IDS uEye camera using gstreamer?

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-25 06:45:08
问题 I have a docker container that uses a gstreamer plugin to capture the input of a camera. It runs fine with a Bastler camera but now I need to use an IDS uEye camera. To be able to use this camera I need to have the ueyeusbdrc service running. The IDS documentation says that to start it I can run sudo systemctl start ueyeusbdrc or sudo /etc/init.d/ueyeusbdrc start . The problem is that when the docker container runs, that service is not running and I get a Failed to initialize camera error,

How to detect when networking initialized in /etc/init.d script?

 ̄綄美尐妖づ 提交于 2020-01-14 10:07:55
问题 I have an /etc/init.d/ script that starts on boot and requires networking to be in place. I have the rc start set to 99, so it's the last thing that loads, but the networking doesn't load immediately and I'm currently having to rely on a 30 second sleep command to wait for network loading. The OS is Ubuntu modified for embedded systems (Yocto Project). The filesystem is the same, but there are very limited services so it's using Sysvinit. Is there a way to check that all networking has

Init.d script hanging

被刻印的时光 ゝ 提交于 2020-01-13 19:07:41
问题 I have an init.d script that looks like: #!/bin/bash # chkconfig 345 85 60 # description: startup script for swapi # processname: swapi LDIR=/var/www/html/private/daemon EXEC=swapi.php PIDF=/var/run/swapi.pid IEXE=/etc/init.d/swapi ### BEGIN INIT INFO # Provides: swapi # Required-Start: $local_fs # Required-Stop: # Default-Start: 3 4 5 # Default-Stop: 0 1 2 6 # Short-Description: startup script for swapi # Description: startup script for swapi.php which processes actionq into switch ### END

Add additional parameters to Spring Boot app

不问归期 提交于 2019-12-31 17:50:06
问题 I am wondering if it's possible to add spring's additional parameters such as -Dspring.profiles.active=prod to spring boot app in case of running it as a service. I checked the script that was generated automatically by spring-boot-maven-plugin : command="$javaexe -jar -Dsun.misc.URLClassPath.disableJarChecking=true $jarfile $@" so maybe it can be done via maven plugin's options, but couldn't find any except of JVM arguments which is not so useful... 回答1: I couldn't find any solution

Add additional parameters to Spring Boot app

旧街凉风 提交于 2019-12-31 17:49:08
问题 I am wondering if it's possible to add spring's additional parameters such as -Dspring.profiles.active=prod to spring boot app in case of running it as a service. I checked the script that was generated automatically by spring-boot-maven-plugin : command="$javaexe -jar -Dsun.misc.URLClassPath.disableJarChecking=true $jarfile $@" so maybe it can be done via maven plugin's options, but couldn't find any except of JVM arguments which is not so useful... 回答1: I couldn't find any solution

How can I set environment variables in my Linux service for Asterisk even though it doesn't have a real user?

廉价感情. 提交于 2019-12-19 12:50:29
问题 I have created a linux service that runs as a deamon (and gets started from /etc/init.d/X). I need to set some environment variables that can be accessed by the application. Here's the scenario. The application is a bunch of Perl AGI scripts that depend on (and therefore need to run as) asterisk user but asterisk doesn't have a shell. Ideally I'd just set this in /home/asterisk/.bashrc but that doesn't exist for asterisk. How can I set environment variables for my app in the asterisk user's

Spring Boot application as a Service

元气小坏坏 提交于 2019-12-17 03:45:01
问题 How to configure nicely Spring Boot application packaged as executable jar as a Service in linux system? Is this recommended approach, or should I convert this app to war and install into Tomcat? Currently I can run Spring boot application from screen session, what is nice, but requires manual start after server reboot. What I'm looking for is general advice/direction or sample init.d script, if my approach with executable jar is proper. 回答1: The following works for springboot 1.3 and above:

Centos 7 - service from /etc/systemd/system/san.service not running with systemctl start san.service

半城伤御伤魂 提交于 2019-12-13 20:48:41
问题 I followed instructions from this link: https://www.thegeekdiary.com/centos-rhel-7-how-to-make-custom-script-to-run-automatically-during-boot/ But I have issue because my service is not being run. I created one script startSanic2.sh which invokes startSanic.sh script (I need this because when I start it manually with & only in this case session is not expired) This is my script startSanic2.sh # cat /opt/horses/startSanic2.sh #!/bin/bash cd /opt/horses ./startSanic.sh & This is my script

Redis starts manually with init.d but not on startup

此生再无相见时 提交于 2019-12-12 23:40:22
问题 Redis properly starts up if I run the command: sudo /etc/init.d/redis-server start I've added my startup script with: sudo update-rc.d redis-server defaults But when I startup from a fresh boot, Redis isn't running. Where should I look to troubleshoot this? 回答1: The defaults thing usually sets starting to 20. It's too early as redis requires networking. So, try below: sudo update-rc.d redis-server remove sudo update-rc.d redis-server start 80 2 3 4 5 . stop 20 0 1 6 . 回答2: Use the below into

debian init.d script not running after reboot

折月煮酒 提交于 2019-12-12 03:32:29
问题 I need to start my Wildfly AS through .sh script after system boot (Linux-Debian). So I created my own script which should do it in init.d: #! /bin/sh # /etc/init.d/starter case "$1" in start) echo "Starting" nohup /home/xxx/wildfly-9.0.1.Final/bin/standalone.sh & ;; stop) echo "Stopping" /home/xxx/wildfly-9.0.1.Final/bin/jboss-cli.sh --connect command=:shutdown ;; *) echo "Usage: /etc/init.d/starter {start|stop}" exit 1 ;; esac exit 0 This works if i use it on my own: /etc/init.d/starter