/usr/sbin/mopidyctl is in mopidy 2.1.0-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #!/bin/sh
SELF=$(basename $0)
DAEMON="/usr/bin/mopidy"
DAEMON_USER="mopidy"
CONFIG_FILES="/usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf"
CMD="$DAEMON --config $CONFIG_FILES $@"
if [ $# -eq 0 ]; then
echo "Usage: $SELF [options]" 1>&2
echo "Examples:" 1>&2
echo " $SELF --help" 1>&2
echo " $SELF config" 1>&2
echo " $SELF local scan" 1>&2
exit 1
fi
if [ $(id -u) -ne 0 ]; then
echo "$SELF must be run as root" 1>&2
exit 2
fi
echo "Running \"$CMD\" as user $DAEMON_USER" 1>&2
su -s /bin/sh -c "$CMD" -- $DAEMON_USER
|