Changeset 991


Ignore:
Timestamp:
Feb 22, 2008, 11:17:53 AM (10 years ago)
Author:
jrollins
Message:

changes for creation of supervise directory with proper permissions

Location:
trunk/cereal
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/cereal/debian/changelog

    r978 r991  
     1cereal (0.19-1) unstable; urgency=low
     2
     3  * added better support of non-default permissions on supervise directories
     4
     5 -- Jameson Rollins <jrollins@fifthhorseman.net>  Thu, 21 Feb 2008 21:56:12 -0500
     6
    17cereal (0.18-1) unstable; urgency=low
    28
  • trunk/cereal/fs/usr/sbin/cereal-admin

    r990 r991  
    6868    check_tty_rw "$SUSER" "$SGROUP" "$TTY"
    6969
     70    # create service directory
    7071    mkdir -p "$SESSIONDIR/$SESSION"
    71 
    72     # create run script
    7372    ln -s "$SHAREDIR/mainrun" "$SESSIONDIR/$SESSION/run"
    7473
     
    8382    echo "$LOGGROUP" > "$SESSIONDIR/$SESSION/env/LOGGROUP"
    8483
    85     # create logging script
     84    # create logging infrastructure
    8685    mkdir -p -m 0750 "$SESSIONDIR/$SESSION/log/main"
     86    ln -s "$SHAREDIR/logrun" "$SESSIONDIR/$SESSION/log/run"
    8787    touch "$SESSIONDIR/$SESSION/log/main/current"
    8888    chmod 0640 "$SESSIONDIR/$SESSION/log/main/current"
     
    9090    chgrp -R "$LOGGROUP" "$SESSIONDIR/$SESSION/log"
    9191
     92
     93    # create supervise directories
     94    mkdir -p "$SUPERVISEDIR/$SESSION"
     95    ln -s "$SUPERVISEDIR/$SESSION" "$SESSIONDIR/$SESSION/supervise"
     96    mkdir -p "$SUPERVISEDIR/$SESSION.log"
     97    ln -s "$SUPERVISEDIR/$SESSION.log" "$SESSIONDIR/$SESSION/log/supervise"
     98    # make supervise directory world accessible if requested
     99    if [ "$SUPERVISE_WORLD_ACCESSIBLE" = 'yes' ] ; then
     100        chmod 0755 "$SUPERVISEDIR/$SESSION"
     101        chmod 0755 "$SUPERVISEDIR/$SESSION.log"
     102    fi
     103
    92104    # create socket for screen, since it can't log to stdout
    93105    mkfifo "$SESSIONDIR/$SESSION/socket"
    94106    chown "$SUSER:$LOGGROUP" "$SESSIONDIR/$SESSION/socket"
    95107    chmod 0640 "$SESSIONDIR/$SESSION/socket"
    96     ln -s "$SHAREDIR/logrun" "$SESSIONDIR/$SESSION/log/run"
    97108
    98109    echo "Created session '$SESSION':"
     
    113124        update-service --add "$SESSIONDIR/$SESSION" "cereal.$SESSION"
    114125        log_write "$SESSION" "session '$SESSION' started."
    115        
    116         # make supervise directory world accessible if requested
    117         if [ "$SUPERVISE_WORLD_ACCESSIBLE" = 'yes' ] ; then
    118             chmod 0755 "$SESSIONDIR/$SESSION/supervise"
    119             chmod 0755 "$SESSIONDIR/$SESSION/log/supervise"
    120         fi
    121126    else
    122127        return 1
  • trunk/cereal/fs/usr/share/cereal/common

    r988 r991  
    1313export ETC="/etc/cereal"
    1414export SESSIONDIR="/var/lib/cereal/sessions"
     15export SUPERVISEDIR="/var/lib/cereal/supervise"
    1516export ERR=0
    1617##################################################
Note: See TracChangeset for help on using the changeset viewer.