diff --git a/bin/items b/bin/eesyphp similarity index 100% rename from bin/items rename to bin/eesyphp diff --git a/bin/eesyphp.wrapper b/bin/eesyphp.wrapper new file mode 100755 index 0000000..eca046c --- /dev/null +++ b/bin/eesyphp.wrapper @@ -0,0 +1,11 @@ +#!/bin/bash + +USER=$( basename $0 ) +REAL_BIN=$( realpath -L $0|sed 's/\.wrapper$//' ) +if [ "$( id -u -n )" != "$USER" ] +then + sudo -u $USER $REAL_BIN $@ + exit $? +fi +$REAL_BIN $@ +exit $? diff --git a/bin/items.wrapper b/bin/items.wrapper deleted file mode 100755 index 1b2d1d3..0000000 --- a/bin/items.wrapper +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [ "$( id -u -n )" != "$( basename $0 )" ] -then - sudo -u $( basename $0 ) $0 $@ - exit $? -fi -$( realpath -L $0|sed 's/\.wrapper$//' ) $@