eesyphp/example/bin/eesyphp.wrapper

12 lines
187 B
Text
Raw Normal View History

#!/bin/bash
USER=$( basename $0 )
REAL_BIN=$( realpath -L $0|sed 's/\.wrapper$//' )
if [ "$( id -u -n )" != "$USER" ]
then
2022-04-24 18:30:02 +02:00
sudo -u $USER $REAL_BIN $@
exit $?
fi
$REAL_BIN $@
exit $?