NSIS-ka
A free C++ implementation of NSIS protocols

Changeset 4519


Ignore:
Timestamp:
Oct 5, 2009, 11:38:17 AM (8 years ago)
Author:
stud-lenk
Message:

Change ownership of logfiles when scripts are being run with sudo.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ntlp/trunk/gist

    r4215 r4519  
    2020trap handle_sigint SIGINT
    2121
    22 src/gistka --config ${CONFDIR}/nsis-ka.conf $* 2>&1 | tee $LOGDIR/test-`date +"%F-%T"`-`hostname`-$$
     22LOGFILE="$LOGDIR/test-`date +%F-%T`-`hostname`-$$"
     23src/gistka --config ${CONFDIR}/nsis-ka.conf $* 2>&1 | tee $LOGFILE
     24
     25# change ownership of logfiles if this script is called via sudo
     26if [ "$SUDO_UID" != "" ]; then
     27        chown $SUDO_UID:$SUDO_GID $LOGFILE
     28fi
    2329
    2430./flush
  • qos-nslp/trunk/src/start-qosnslp

    r4216 r4519  
    2626trap handle_sigint SIGINT
    2727
    28 ./qosnslp -c ${CONFDIR}/nsis-ka.conf $* 2>&1 | tee -i $LOGDIR/test-`date +"%F-%T"`-`hostname`-$$
     28LOGFILE="$LOGDIR/test-`date +%F-%T`-`hostname`-$$"
     29./qosnslp -c ${CONFDIR}/nsis-ka.conf $* 2>&1 | tee -i $LOGFILE
     30
     31# change ownership of logfiles if this script is called via sudo
     32if [ "$SUDO_UID" != "" ]; then
     33        chown $SUDO_UID:$SUDO_GID $LOGFILE
     34fi
    2935
    3036./flush
Note: See TracChangeset for help on using the changeset viewer.