3

Linux CentOS 6.5

Here's my upstart script inside of /etc/init/

start on runlevel [2345]
stop on runlevel [!2345]

exec /usr/bin/riofs --fuse-options="allow_other" --fmode=0777 --dmode=0777 ct.recordergo /mnt/applications/recorder/streams/_definst_/s3

I want to run this program once on startup.

I get no logs inside of /var/log/upstart.

I'm not sure if the script is working or not. How can get it to log a success or failure?

2 Answers2

3

You can enable debugging to the system log with the initctl log-priority <priority> command.

To change the priority with which Upstart logs messages to the system log, you can change the log priority at any time using log-priority command as follows:

initctl log-priority <priority>

Where <priority> may be one of:

debug, info, message, warn, error, fatal

See http://upstart.ubuntu.com/cookbook/#debugging for more information

Maux
  • 221
  • 1
  • 4
1

The version of Upstart in centos is very old (v0.6.5 from 2010) and does not have logging support. Use the work-around as documented in the Upstart Cookbook:

user282262
  • 11
  • 1
  • This is for an Ubuntu server. I'm not running an Ubuntu server, and thus, I don't have the /dev/.initramfs directory that the directions are telling me to write logs to. When I tried this it didn't work –  Jun 19 '14 at 15:24