Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2864  / 1 Year ago, mon, february 6, 2023, 10:48:11

Hi can i use the old style init scripts under ub 12.04? im fed up with my upstart scripts working intermittently.



I have a process which relies on cifs mounts (defined in fstab). I've tried all the usual 'wait for the interface' and 'wait for the local filesystem' dependencies in my upstart but nothing seems to work. My command works fine on the cmd line.



I think what's happening is that cifs hasn't mounted at the time the upstart script tries to run. Upstart just seems broken to me.






start on (local-filesystems and net-device-up IFACE=eth0 and mounted MOUNTPOINT=/storage/server)
stop on shutdown

expect daemon

script
cd /storage/server/scripts/myprog
su -c "/home/gurpal2000/ruby-1.9.3-p0/bin/bundle exec /home/gurpal2000/ruby-1.9.3-p0/bin/ruby lib/main.rb > /storage/server/logs/myprog.txt 2>&1" gurpal2000
end script





Thanks


More From » upstart

 Answers
7

Upstart is not broken. Take a look at the following:





I think you may be able to simplify your 'start on' to be simply:



start on (filesystem and static-network-up)


Take a look at upstart-events(7), or online here:



http://upstart.ubuntu.com/cookbook/#ubuntu-well-known-events-ubuntu-specific



See also:





Upstart still supports SysV jobs, so if you really want to you can create /etc/init.d/foo.


[#38368] Wednesday, February 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
taigysel

Total Points: 33
Total Questions: 136
Total Answers: 114

Location: Singapore
Member since Wed, Jan 13, 2021
3 Years ago
taigysel questions
;