12 lines
185 B
Text
12 lines
185 B
Text
|
#!/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 $?
|