From 0aa07718054116019222cbd69b81f1508bfa8dc0 Mon Sep 17 00:00:00 2001 From: epoch Date: Sun, 9 Feb 2014 07:09:28 -0600 Subject: added minimal startup scripts. deleted a bunch of shit from compile.sh cleaned segfault a bit. made the shell script not auto-generated. everything expects /home/segfault/ to be where segfault gets ran. you have to do the chdir yourself now. --- compile.sh | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) (limited to 'compile.sh') diff --git a/compile.sh b/compile.sh index a920ae2..6c17703 100755 --- a/compile.sh +++ b/compile.sh @@ -1,33 +1,5 @@ #!/bin/sh -#clean it out so I quit restarting after a failed compile. >.< -INSTALL_DIR="/home/segfault/" -rm segfault -echo '#!/bin/sh' > shell -echo '# this file is generated by compile.sh. do not edit directly' >> shell -echo 'cd "'`pwd`'"' >> shell -echo 'kill `pgrep -P 1 -f "tail -f ./files/cmd_in"`' >> shell -echo 'setuidgid segfault tail -f ./files/cmd_in | setuidgid segfault su -l segfault > ./files/cmd_out 2>&1' >> shell -chmod +x shell -echo '#define CHDIR "'`pwd`'"' > config.h - -#if [ -e /usr/lib/libirc.so ]; then -# gcc -Wall -o segfault segfault.c -lirc -# rm -r /var/www/source/segfault/* -# cd /home/epoch/projects/c_/wargaming-libirc -# ./compile.sh -# cd /root/services/segfault -# cp * /var/www/source/segfault/ -# mkdir /var/www/source/segfault/scripts -# cp scripts/* /var/www/source/segfault/scripts/ -# cd /var/www/source/ -# tar -czf segfault.tgz segfault - - mkdir $INSTALL_DIR/files - mkfifo $INSTALL_DIR/files/cmd_in - mkfifo $INSTALL_DIR/files/cmd_out - cd libirc - ./compile.sh - cd .. - gcc -Wall -o segfault segfault.c -lirc -Llibirc -Ilibirc - -rm config.h +cd libirc +./compile.sh +cd .. +gcc -Wall -o segfault segfault.c -lirc -Llibirc -Ilibirc -- cgit v1.2.3