Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Fixes:
- # - moved from http to https where possible
- # - tons of performance tweaks
- #
- # Not addressed:
- # - systemctl disable log2ram
- # - rm /etc/cron.daily/log2ram
- # - /etc/cron.d/make_nas_processes_faster including HMP fix for octa-core boards
- # - ODROID-XU4 Cloudshell 2 stuff
- install_omv (){
- #------------------------------------------------------------------------------------------------------------------------------------------
- # Install OpenMediaVault 3
- #------------------------------------------------------------------------------------------------------------------------------------------
- if [ $distribution != "jessie" ]; then
- dialog --backtitle "$backtitle" --title "Dependencies not met" --msgbox "\nOpenMediaVault 3 can only be installed on Debian Jessie." 7 52
- sleep 5
- exit
- fi
- apt-get --yes --force-yes --allow-unauthenticated install openmediavault-keyring
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7AA630A1EDEE7D73
- cat > /etc/apt/sources.list.d/openmediavault.list << EOF
- deb https://openmediavault.github.io/packages/ erasmus main
- ## Uncomment the following line to add software from the proposed repository.
- deb https://openmediavault.github.io/packages/ erasmus-proposed main
- ## This software is not part of OpenMediaVault, but is offered by third-party
- ## developers as a service to OpenMediaVault users.
- # deb https://openmediavault.github.io/packages/ erasmus partner
- EOF
- debconf-apt-progress -- apt-get update
- debconf-apt-progress -- apt-get -y install openmediavault postfix
- URL='https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/openmediavault-omvextrasorg_latest_all3.deb'; FILE=`mktemp`; wget "$URL" -qO $FILE && dpkg -i $FILE; rm $FILE
- /usr/sbin/omv-update
- # Install flashmemory plugin and netatalk by default, use nice logo for the latter,
- # Disable OMV monitoring by default
- . /usr/share/openmediavault/scripts/helper-functions
- apt-get -y -q install openmediavault-netatalk openmediavault-flashmemory
- AFP_Options="mimic model = Macmini"
- SMB_Options="min receivefile size = 16384\nwrite cache size = 524288\ngetwd cache = yes\nsocket options = TCP_NODELAY IPTOS_LOWDELAY"
- xmlstarlet ed -L -u "/config/services/afp/extraoptions" -v "$(echo -e "${AFP_Options}")" /etc/openmediavault/config.xml
- xmlstarlet ed -L -u "/config/services/smb/extraoptions" -v "$(echo -e "${SMB_Options}")" ${OMV_CONFIG_FILE}
- xmlstarlet ed -L -u "/config/services/flashmemory/enable" -v "1" /etc/openmediavault/config.xml
- xmlstarlet ed -L -u "/config/services/ssh/enable" -v "1" /etc/openmediavault/config.xml
- xmlstarlet ed -L -u "/config/services/ssh/permitrootlogin" -v "1" /etc/openmediavault/config.xml
- xmlstarlet ed -L -u "/config/system/time/ntp/enable" -v "1" /etc/openmediavault/config.xml
- read TZ </etc/timezone
- xmlstarlet ed -L -u "/config/system/time/timezone" -v "${TZ}" /etc/openmediavault/config.xml
- read HOSTNAME </etc/hostname
- xmlstarlet ed -L -u "/config/system/network/dns/hostname" -v "${HOSTNAME}" /etc/openmediavault/config.xml
- /usr/sbin/omv-rpc -u admin "perfstats" "set" '{"enable":false}'
- /usr/sbin/omv-rpc -u admin "config" "applyChanges" '{ "modules": ["monit","rrdcached","collectd"],"force": true }'
- sed -i 's|-j /var/lib/rrdcached/journal/ ||' /etc/init.d/rrdcached
- /usr/sbin/omv-mkconf netatalk
- /usr/sbin/omv-mkconf samba
- /usr/sbin/omv-mkconf flashmemory
- /usr/sbin/omv-mkconf ssh
- /usr/sbin/omv-mkconf ntp
- /usr/sbin/omv-mkconf timezone
- /usr/sbin/omv-mkconf monit
- /usr/sbin/omv-mkconf rrdcached
- /usr/sbin/omv-mkconf collectd
- /sbin/folder2ram -enablesystemd
- # Prevent accidentally destroying board performance by clicking around in OMV UI
- . /etc/default/cpufrequtils
- echo -e "OMV_CPUFREQUTILS_GOVERNOR=${GOVERNOR}" >>/etc/default/openmediavault
- echo -e "OMV_CPUFREQUTILS_MINSPEED=${MIN_SPEED}" >>/etc/default/openmediavault
- echo -e "OMV_CPUFREQUTILS_MAXSPEED=${MAX_SPEED}" >>/etc/default/openmediavault
- omv-initsystem
- check_port 80
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement