Tag Info

New answers tagged

0

The only reason I have come up with to use start-stop-daemon is if the pre-start or post-stop sections need to be run as root, but the main process needs another user. Example here: # Create directory with the daemon's user (need to run this as root) pre-start exec install -o _foo -g _foo -d /run/foo # Use start-stop-daemon to run the daemon as another ...


0

I had the same error with /usr/sbin/node being used instead of /usr/bin/node. I just removed /usr/sbin/node


2

upstart and systemd are init systems. By convention (and perhaps other constraints), the program is still called init, irrespective of whether systemd or upstart or something else is at play. Don't let the process name fool you. PID1 is not SysV init any longer. It hasn't been for quite some time on Ubuntu.


6

See the manual for init on Unix systems. This is a post from the Wikipedia entry on init: In Unix-based computer operating systems, init (short for initialization) is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct or indirect ancestor of all ...


2

Ubuntu 14.04 does and will use Upstart for init. However, systemd has many components, and a number of them can be used without systemd being the init service. For example, logind has been in use for a couple of releases at least. Don't worry, you will have Upstart as init as long as you stick with 14.04. This will change in future releases.


0

I was wondering the same thing. See my question at Which arguments are passed to init scripts during shutdown. The reason is that all scripts in rc0.d are first called with start and then again with stop. This way you can order the final shutdown scripts independently of any other kill scripts to be executed during shutdown.


0

I had a similar issue, and it seems like the rsyslog configuration for logrotate is broken, so instead of calling service rsyslog rotate which actually works, it uses reload rsyslog or similar. Turns out this was actually a bug, which has been fixed in version 7.4.4-1ubuntu5, but my installation of Ubuntu 14.04 only sees version 7.4.4-1ubuntu2 in apt. This ...


0

I finally found the answer. Apparently it was with permission and authorization to access Xserver and stuff like that. The xgamma version of my script that works like a charm is: #! /bin/bash export XAUTHORITY=/home/<username>/.Xauthority # This give permission to access Xserver Br=`cat /sys/class/backlight/acpi_video0/actual_brightness` # Display ...


0

The program you use needs to access the X server, and does not know which X display it should use. In most cases, you can work around this by setting a fixed display name :0.0, which is normally the name of the first display, and the one if only one is running. For example, at the start of your script, you can use: export DISPLAY=:0.0 In general, you ...


0

CUPS on Ubuntu is started by Upstart via the file /etc/init/cups.conf. The file /etc/init.d/cups is ignored. /etc/init/cups.conf is not an init script, but a configuration for Upstart. It does start the main daemon, and is not only a pre- and post- configuration for CUPS. The service and initctl utilities report unknown job when the variable UPSTART_SESSION ...


0

Of the two, only one is actually an init script: /etc/init.d/cups. The /etc/init/cups.conf file appears to be a configuration file and runs ceertain things before/after the daemons is started but it is not itself an init script. It lacks the proper format (start,stop,restart etc. functions) and in any case, is not in the right place. Init scripts are in the ...


0

You should really try to learn why gnome-session is outputting so many logs, but in the meantime, you can do this: rm ~/.cache/upstart/gnome-session-Unity.log ln -s /dev/null ~/.cache/upstart/gnome-session-Unity.log


0

Create a file $HOME/.config/upstart/myGuiStart.conf Content: start on desktop-start stop on desktop-end respawn exec firefox or another example with a delay: start on desktop-start stop on desktop-end respawn script sleep 30 firefox end script description of respawn: respawn A service or task with this stanza will be ...


3

The problem you are facing is that when upstart (or systemd, or the scripts in /etc/rc.d/) are run, there is normally no graphic service ("the X server") running. Moreover, the availability of the graphic subsystem in Unix is strictly bond to the concept that a user has done a graphic login, and just this user has the right to use the graphic environment. ...


0

I'm now thinking this is a bug, and related to the way upstart starts services with "expect daemon" (i.e. services that fork twice upon startup). I notice that if I use strace on a process that is using capabilities(7) the capabilities are also ignored. I suspect that upstart, in order to determine the PID to wait on, traces a service specified with "expect ...


0

Easy way to start, stop, restart, reload services: service srv start|stop|restart|reload or invoke-rc.d srv start|stop|restart|reload or initctl start|stop|restart|reload srv or start|stop|restart|reload srv (service command is your best bet) Easy way to enable/disable services: update-rc.d srv enable|disable (still works with Upstart) ...


1

I have no idea how MAX_COVER is working, but variables do not expand in env stanzas. For example, take the following job: env US=yhej env SU="$US" exec echo $US $SU If variables expanded, this would output: yhej yhej but instead, it outputs: yhej $US You can modify your job to use a script section and variables will be expanded: description ...


1

From the Upstart cookbook (steps 9-11): Since the start on condition for the rc-sysinit job is: start on filesystem and net-device-up IFACE=lo Upstart will then start the rc-sysinit job. The rc-sysinit job calls the telinitcommand, passing it the runlevel to move to: telinit 2 The telinit command emits the runlevel(7)event as: ...


1

Replace /dev/shm with /run/shm. For details, see: http://www.thefanclub.co.za/how-to/how-secure-ubuntu-1204-lts-server-part-1-basics and Secure shared memory


1

Figured it out :) :) :) The problem was the missing --noconsole option. The console of the Minecraft server is on per default and got some commands that it shouldn't get, then it replied "<" everytime and this output was piped into the logfile constantly. Now my upstart script looks like this and it works fine: start on runlevel [2345] stop on runlevel ...


0

The simple answer is no, but if the dependent service has start on conditions that satisfy your dependency, then it would work. In this case, it seems like you should be fine.



Top 50 recent answers are included