Questions tagged [init.d]

The init.d directory contains a number of start/stop scripts for various services on a Linux system.

352 questions
0
votes
0 answers

Auto SSH with OpenWRT Router to AWS EC2 Server

I've got a OpenWRT router that I'm trying to make a persistent reverse ssh tunnel to an Amazon AWS server. The issue is my ISP changes my public IP so in order to ssh to it, I have to use port knocking to prevent every IP from seeing the ssh port. …
0
votes
1 answer

Autostart a node.js script using init.d in Debian

I have a little node application on a server (node mailer) that I run by going to its source folder and executing npm start. I figured the best way to run this automatically would be to create a my_script.sh file and drop it in the init.d directory…
jcoop7777
  • 73
  • 6
0
votes
1 answer

WildFly init.d scripts for SUSE Linux

I want to start and stop WildFly 15 on Linux SUSE 11 together with the machine. I'm not expert in Linux and this is my first experience with SUSE. I found WildFly comes with init.d scripts for 2 Linux distributions: Debian and Red…
Daniel Rodríguez
  • 548
  • 1
  • 10
  • 30
0
votes
2 answers

/etc/rc* not running on Ubuntu 18.04 in Docker. Cannot start cron on boot

I can't seem to convince the cron (or any other) service to start with my Ubuntu container. I'm sure I'm missing something simple. I've tried using both update-rc.d and /etc/rc.local but no joy. In this example Dockerfile I'm also trying to get…
Matt Savage
  • 327
  • 4
  • 11
0
votes
0 answers

Shell file skips commands when run at boot using init.d?

I'm running Armbian Linux and trying to execute a shell file at boot. The file runs perfectly when I execute it through the command line after boot. However, it skips my Python commands (which are supposed to send animations to an OLED screen) when…
Marc
  • 123
  • 1
  • 4
  • 17
0
votes
1 answer

Ubuntu Server init.d - testing if value is greater than 1

I am writing an init.d script and am looking to test if a returned value is greater than 1. What would be the correct syntax for 'greater than'? mc_status() { if ps ax | grep -ci 'CanaryMod.jar' > 0 then echo…
Mlynch1985
  • 91
  • 1
  • 1
  • 5
0
votes
1 answer

init.d script fails to redirect stdin stderr of executable and gets the wrong process ID

I have a simple python script test.py: #!/user/bin/python print "Why is it not redirecting?" Then I have a init.d script where I'm trying to do ./test.py &> logfile.log & PID=$! except what happens is that the PID is wrong, it prints to my shell…
Kit Sunde
  • 35,972
  • 25
  • 125
  • 179
0
votes
1 answer

How to execute a privileged action from a CGI script

I want to restart a linux service from a shell CGI script, which obviously requires root rights. I'm kind of out of options that I know of: Giving root access to my web server seems very dangerous Using setuid on my CGI script doesn't work and…
torvin
  • 6,515
  • 1
  • 37
  • 52
0
votes
1 answer

Can't download a file via os.system('scp (...)') whithin a python script launched via a init script

I'm trying to download a remote file using the scp command called by os.system() in a Python script (scp.py) started as a service by a procd init script. This script is running on OpenWrt 15.05.1 (which uses BusyBox to implement the shell…
Sir Robin
  • 182
  • 2
  • 14
0
votes
1 answer

Hudson does not want to start in Opensuse anymore. Empty pid file

I installed using the hudson.rpm as specified on the site provided. I also installed ant after starting hudson, for some reason when i try to run /etc/init.d/hudson start it just fails saying Starting Hudson startproc: Empty pid file…
Stephan Grobler
  • 469
  • 1
  • 5
  • 17
0
votes
1 answer

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

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…
Veljko
  • 1,708
  • 12
  • 40
  • 80
0
votes
0 answers

Centos 7 - Script not runing from init d - manually with & it starts in background

I have created script in init.d /etc/init.d/startSanic #!/bin/bash cd /opt/horses ./startSanic.sh & startSanic is with permissions 777 startSanic.sh is with permissions 755 I intentionally created two scripts because only if I start script…
Veljko
  • 1,708
  • 12
  • 40
  • 80
0
votes
1 answer

How to put python3 manage.py runserver in a Bash Script

Here is my Bash script it's very simple. I added it to the init/d folder so it works upon rebooting my computer. I create directories and so that part of the script is working; However my server won't run. I'm trying to avoid having to type…
kenedy
  • 21
  • 3
0
votes
1 answer

How can i allow a self made jar file the permission for reading and writing while autostart?

first at all i want to say, i'm not a studied programmer. I have written a server application and want to start these server automatically if i reboot a raspberry pi (operating System is debian). My server application creates folders for security…
Björn
  • 1
0
votes
0 answers

Script in init.d not executing

I'm trying to send a Slack notification of a server's IP address on startup. I'm running Ubuntu 18.04. The script works fine when ran from command line (creates a log file & send the Slack message). It's placed at /etc/init.d/iptoslack.sh, and I've…
Perdex
  • 130
  • 1
  • 12