pichonCalavera: Thanks for that!
Would you be willing to modify the Redhat setup script for Debian?
Here's the current redhat script:
Code:
--------------------
#!/bin/sh
# Redhat, Fedora, CentOS, etc. setup script for the SrvrPowerCtrl plugin
#
echo 'Setting up SrvrPowerCtrl plugin..'
#fixup permissions for our plugin
chown -R squeezecenter:squeezecenter ../../.
SCRIPT_DIR="/usr/bin"
#copy the scripts into the scriptdir..
cp ./screstart.sh $SCRIPT_DIR
#fix permissions on the scripts..
chmod a+x "$SCRIPT_DIR/screstart.sh"
chown root:root "$SCRIPT_DIR/screstart.sh"
#Allow the squeezecenter user to use the 'shutdown' command..
touch /etc/shutdown.allow
echo 'squeezecenter' >>/etc/shutdown.allow
#Tell sudo that the squeezecenter user can run commands and scripts
#without being logged into a console..
sed -i -e 's/\s*Defaults *requiretty$/#Defaults requiretty/' /etc/sudoers
sed -i -e 's/\s*Defaults\t*requiretty$/#Defaults requiretty/' /etc/sudoers
#Tell sudo that the squeezecenter user has permissions to run these commands..
echo '%squeezecenter ALL=NOPASSWD:/sbin/shutdown' >>/etc/sudoers
echo '%squeezecenter ALL=NOPASSWD:/usr/sbin/pm-suspend' >>/etc/sudoers
echo '%squeezecenter ALL=NOPASSWD:/usr/sbin/pm-hibernate' >>/etc/sudoers
echo "%squeezecenter ALL=NOPASSWD:$SCRIPT_DIR/screstart.sh" >>/etc/sudoers
echo 'Done!'
--------------------
The current redhad script resides at:
/var/lib/squeezecenter/Plugins/SrvrPowerCtrl/scripts/Redhat/svrpowerctrlsetup.sh
Could you copy this svrpowerctrlsetup script and the screstart.sh to:
/var/lib/squeezecenter_trunk/Plugins/SrvrPowerCtrl/scripts/Debian/
..modifying it to match the hoops you had to jump through for debian
setup, and post the new script here?
I think this version of screstart.sh ought to work with Debian:
Code:
--------------------
#!/bin/sh
#
# SrvrPowerCtrl plugin helper script for debian linux.
#
# Copy this script to /usr/bin/screstart.sh: cp ./screstart.sh
/usr/bin/screstart.sh
#
#
# Change the permissions: chown root:root /usr/bin/screstart.sh
#
# Make it executable: chmod a+x /usr/bin/screstart.sh
#
# This script will restart the SqueezeCenter service.
#
#
#
/bin/echo "$0 - screstart.log" >/tmp/screstart.log
/bin/date >>/tmp/screstart.log
#
#Using 'at' doesn't work. 'at' requires the user to have shell privilages,
which squeezecenter doesn't
#/bin/echo "/sbin/service squeezecenter restart" | /usr/bin/at -m $1
>>/tmp/screstart.log
#
/etc/rc.d/init.d/squeezecenter status >>/tmp/screstart.log
/etc/rc.d/init.d/squeezecenter stop >>/tmp/screstart.log
/bin/sleep 15
/etc/rc.d/init.d/squeezecenter start >>/tmp/screstart.log
/bin/sleep 15
/etc/rc.d/init.d/squeezecenter status >>/tmp/screstart.log
--------------------
I'd really like to make this plugin 100% debian friendly, but it's
going to be a while before I can make myself a debian server to test
with.
Any help you could give me here would be greatly appreciated. Thanks.
--
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins