Questions tagged [upstart]

Upstart is an event-based replacement for the traditional init daemon used to perform tasks when the computer is started.

Upstart is an event-based replacement for the traditional init daemon used to perform tasks when the computer is started. Be sure to check out the cook book found at : http://upstart.ubuntu.com/cookbook/

545 questions
11
votes
2 answers

What's the proper way to run some Python code asynchronously?

I needed to send mail from my plain Flask app, so I thought the simplest way would be to send it using smtplib. But I had to do it asynchronously - you can't just insert a 3 second delay into the request - right? So I add the email to a queue (psql…
Hugo
  • 2,569
  • 1
  • 19
  • 18
10
votes
1 answer

uwsgi upstart on amazon linux

I created a uwsgi file following this tutorial https://uwsgi.readthedocs.org/en/latest/Upstart.html on amazon linux. Though It doesn't seem to run as Nginx just says bad gateway. If I run the /etc/init/uwsgi.conf description "uwsgi tiny…
tourdownunder
  • 1,779
  • 4
  • 22
  • 34
10
votes
3 answers

How to set environment variable in pre-start in Upstart script?

We have a custom C++ daemon application that forks once. So we've been doing this in our Upstart script on Ubuntu 12.04 and it works perfectly: expect fork exec /path/to/the/app However now we need to pass in an argument to our app which contains…
Zach
  • 1,835
  • 3
  • 13
  • 11
10
votes
1 answer

Gunicorn and Django with Upstart and Nginx

First of all I have many Django instances setup and running like this. In each project I have a script.sh shell script that starts gunicorn etc.: #!/bin/bash set -e LOGFILE=/var/log/gunicorn/app_name.log LOGDIR=$(dirname $LOGFILE) …
Harry
  • 13,091
  • 29
  • 107
  • 167
9
votes
2 answers

What are the advantages and disadvantages of using the upstart script or forever script in a context of running node.js scripts ??

I am a node.js developer. I use Amazon ec2 to deploy my node.js apps. I want to have my node.js service running permanently - restarted if it fails for any reason. I came across 2 tools . Forever and Upstart Is there any advantages of using one…
geeky_monster
  • 8,672
  • 18
  • 55
  • 86
9
votes
1 answer

Using Upstart to manage Unicorn w/ rbenv + bundler binstubs w/ ruby-local-exec shebang

Alright, this is melting my brain. It might have something to do with the fact that I don't understand Upstart as well as I should. Sorry in advance for the long question. I'm trying to use Upstart to manage a Rails app's Unicorn master process.…
codykrieger
  • 1,750
  • 15
  • 19
9
votes
1 answer

Can upstart's "service start" be used inside a cron job?

TLDR; Is it possible to create a cron job that runs service service_name start? How? Content of my sudo crontab -e is: 45 23 * * * service bormarise_celery_daemon start This runs normally on terminal as root or server: service…
Irvan
  • 439
  • 4
  • 19
9
votes
1 answer

Upstart task hangs after it finishes successfully

I've got an Upstart task that starts multiple instances of a service based on Starting multiple upstart instances automatically and Restarting Upstart instance processes. It's working and it starts all instances but after it successfully starts them…
JDiPierro
  • 802
  • 1
  • 9
  • 28
9
votes
2 answers

Running services (upstart/init.d) in a container

I'm trying to launch a system in docker that has many init and upstart services and I get this error. initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused All the workarounds suggest making a…
Goblinhack
  • 2,859
  • 1
  • 26
  • 26
9
votes
3 answers

Run python script as daemon at boot time (Ubuntu)

I've created small web server using werkzeug and I'm able to run it in usual python way with python my_server.py. Pages load, everything works fine. Now I want to start it when my pc boots. What's the easiest way to do that? I've been struggling…
and3p
  • 994
  • 2
  • 10
  • 23
8
votes
2 answers

Upstart calling script (for inserted USB-drive)

I know that Ubuntu (and Fedora) uses Upstart istead of the classical System V init daemon (SysVinit). I would like to know how to detect when a USB-drive has been inserted, mount it and copy some files to it. I would like Upstart to call my own…
user14070
8
votes
1 answer

Ubuntu docker container with upstart and syslog

After searching around, I'm still confused whether you can have a docker container running Ubuntu with a working init system (upstart) and syslog, or not. I know docker containers are meant for running a single process and not a full OS, but my use…
Calin
  • 2,110
  • 1
  • 21
  • 36
8
votes
2 answers

How to limit the number of instances UpStart can simultaneously start or respawn

I have a UpStart service job that has many (~100) instance that need to be started. Each of them is a resource-heavy process that does a lot of disk reading/writing during startup. When all of them start or respawn at the same time, they cause…
Shanqing Cai
  • 3,756
  • 3
  • 23
  • 36
8
votes
2 answers

Upstart / init script not working

I'm trying to create a service / script to automatically start and controll my nodejs server, but it doesnt seem to work at all. First of all, I used this source as main reference…
user169099
  • 137
  • 2
  • 7
8
votes
2 answers

Upstart stop if running

I have a Jenkins job to stop a node application, deploy code, and start the application. The start/stop is done with an Upstart script. I use initctl stop node-App If the job is running, this works great. But if the app has died or is in a stopped…
jsmickey
  • 718
  • 10
  • 20
1 2
3
36 37