2020-11-18 18:33:08 +01:00
|
|
|
#!/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 $?
|
2020-11-18 18:33:08 +01:00
|
|
|
fi
|
|
|
|
$REAL_BIN $@
|
|
|
|
exit $?
|