2013-08-22, 14:08
Hai, Im looking at your script and this is nice.
I have some suggestions to make it even more compatible with defaults installed of ubuntu ( or debian )
For example, your using "SYSCTL_CONF_FILE" aka /etc/sysctl.conf
but if you want to do it the "correct" way, and keep your settings save when upgrading, you should use the folder /etc/sysctl.d/
here you add an extra file for example like : 20-xbmc-tuning.conf with the new or extra settings.
Same for lm-sensors, rsyslog. I'm not bashing your script, please understand that, but this make your install even better.
there are several for these settings folders, just look in to it.
I have a similar script for a ubuntu/debian install of nagios3 + centreon, and im aboute to make a new one for xbmc.
If it's ok, i'll use your script as base for my install, and i'll share it when finished.
And small "maybe error" in your script. what if, if my username for xbmc is NOT xmbc, your script fails, and this simple to fix.
for example this : ( my username will be mediauser )
HOME_DIRECTORY="/home/$XBMC_USER/" ( be constistand with the / at the end or not ) ( so /home/mediauser/ )
XBMC_USERDATA_DIR=$HOME_DIRECTORY".xbmc/userdata/" still ok : /home/mediauser/.xbmc/userdata/"
XBMC_XSESSION_FILE="/home/xbmc/.xsession" wil fail... should be : XBMC_XSESSION_FILE="${HOME_DIRECTORY}.xsession"
I suggest the following ( again no bashing, just some pointers to improve the script. )
HOME_DIRECTORY="/home/${XBMC_USER}"
XBMC_USERDATA_DIR="${HOME_DIRECTORY}/.xbmc/userdata/"
due of the "${VALUE}" every thing wil be "text", and less problems with adding variables together.
some extra things to add, this is what im working on. setups scripted, with multiple player support ( use of sql database )
added download systems to the server where the database is running. ( aka adding sabnzbd, couchpotata, sickbeard, headphones, auto-sub and spotweb )
added server(+player) or player setup (with database)
when adding the "xbmc" user give give it a fixed uid/gid like for example 5001:5001
now its easy to add a shared library with mysql on multiple systems.
i added in samba on the share these parameters. ( for example )
[series]
comment = NAS Series Share
path = /home/mediauser/Series
force user = mediauser
inherit permissions = yes
read only = no
guest ok = yes
on a player, i mount this share, in the same folder as on the server.
/home/mediauser/Series
al the download programms are running with the same username, so no rights problems.
since the player also has the same xbmc username and uid/gid, you can mount it with this user.
( from fstab )
//nas/series /home/mediauser/Series cifs sec=ntlmv2,credentials=/etc/samba/smbcredentials 0 0
( smbcredentials only have username=mediauser and password=password )
al my players have the same sources.xml , so 1 setup, copy, done.
and, with this you can go fully crazy and make 1 master user and symlink all the addons to all the other players in there user.
for my living room xbmc is server and player ( and master user) , so install 1 add-on on the master and all the players get them also.
so less maintainance.
When i im ready, i'll share my script with Bram77, to see, how to even get Bram script even more "the bomb" .. !
Now, its already the bomb, but it will go nuclear .... ;-)
I have some suggestions to make it even more compatible with defaults installed of ubuntu ( or debian )
For example, your using "SYSCTL_CONF_FILE" aka /etc/sysctl.conf
but if you want to do it the "correct" way, and keep your settings save when upgrading, you should use the folder /etc/sysctl.d/
here you add an extra file for example like : 20-xbmc-tuning.conf with the new or extra settings.
Same for lm-sensors, rsyslog. I'm not bashing your script, please understand that, but this make your install even better.
there are several for these settings folders, just look in to it.
I have a similar script for a ubuntu/debian install of nagios3 + centreon, and im aboute to make a new one for xbmc.
If it's ok, i'll use your script as base for my install, and i'll share it when finished.
And small "maybe error" in your script. what if, if my username for xbmc is NOT xmbc, your script fails, and this simple to fix.
for example this : ( my username will be mediauser )
HOME_DIRECTORY="/home/$XBMC_USER/" ( be constistand with the / at the end or not ) ( so /home/mediauser/ )
XBMC_USERDATA_DIR=$HOME_DIRECTORY".xbmc/userdata/" still ok : /home/mediauser/.xbmc/userdata/"
XBMC_XSESSION_FILE="/home/xbmc/.xsession" wil fail... should be : XBMC_XSESSION_FILE="${HOME_DIRECTORY}.xsession"
I suggest the following ( again no bashing, just some pointers to improve the script. )
HOME_DIRECTORY="/home/${XBMC_USER}"
XBMC_USERDATA_DIR="${HOME_DIRECTORY}/.xbmc/userdata/"
due of the "${VALUE}" every thing wil be "text", and less problems with adding variables together.
some extra things to add, this is what im working on. setups scripted, with multiple player support ( use of sql database )
added download systems to the server where the database is running. ( aka adding sabnzbd, couchpotata, sickbeard, headphones, auto-sub and spotweb )
added server(+player) or player setup (with database)
when adding the "xbmc" user give give it a fixed uid/gid like for example 5001:5001
now its easy to add a shared library with mysql on multiple systems.
i added in samba on the share these parameters. ( for example )
[series]
comment = NAS Series Share
path = /home/mediauser/Series
force user = mediauser
inherit permissions = yes
read only = no
guest ok = yes
on a player, i mount this share, in the same folder as on the server.
/home/mediauser/Series
al the download programms are running with the same username, so no rights problems.
since the player also has the same xbmc username and uid/gid, you can mount it with this user.
( from fstab )
//nas/series /home/mediauser/Series cifs sec=ntlmv2,credentials=/etc/samba/smbcredentials 0 0
( smbcredentials only have username=mediauser and password=password )
al my players have the same sources.xml , so 1 setup, copy, done.
and, with this you can go fully crazy and make 1 master user and symlink all the addons to all the other players in there user.
for my living room xbmc is server and player ( and master user) , so install 1 add-on on the master and all the players get them also.
so less maintainance.
When i im ready, i'll share my script with Bram77, to see, how to even get Bram script even more "the bomb" .. !
Now, its already the bomb, but it will go nuclear .... ;-)