Project.pm: do not unlink nonexistent file
[girocco.git] / toolbox / run-taskd.sh
blob3ff1489a2b2d44a1dd78932f983a437e7c5a278a
1 #!/bin/sh
3 DEFAULTOPTS="-q -P"
5 test -n "$PATH" || PATH="$(/usr/bin/getconf PATH)"
6 export PATH
7 cd /
8 shbin=@shbin@
10 exec_login_shell() {
11 # set arg 0 to have a leading '-' to force a login shell since
12 # the -l option is shell-specific. All shells must understand -i.
13 exec @perlbin@ -e 'my $b=shift; exec $b @ARGV or die "Can\047t exec \"$b\": $!\n"' "${SHELL:-$shbin}" "-$(basename "${SHELL:-$shbin}")" -i
16 if [ "$1" = "--shell" ]; then
17 shift
18 trap 'trap - HUP INT QUIT PIPE TERM TSTP TTIN TTOU; exec_login_shell' EXIT
19 trap '' HUP INT QUIT PIPE TERM TSTP TTIN TTOU
21 trap - HUP INT QUIT PIPE TERM TSTP TTIN TTOU
22 @perlbin@ -I@basedir@/taskd @basedir@/taskd/taskd.pl --same-pid $DEFAULTOPTS "$@"
24 exit
26 exec @perlbin@ -I@basedir@/taskd @basedir@/taskd/taskd.pl --same-pid $DEFAULTOPTS "$@"