Browse Source

Add owncloud music app

Bob Mottram 10 years ago
parent
commit
1f8c7045bf
1 changed files with 35 additions and 0 deletions
  1. 35
    0
      install-freedombone.sh

+ 35
- 0
install-freedombone.sh View File

3125
   echo 'repair_databases_script' >> $COMPLETION_FILE
3125
   echo 'repair_databases_script' >> $COMPLETION_FILE
3126
 }
3126
 }
3127
 
3127
 
3128
+function install_owncloud_music_app {
3129
+  if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
3130
+      return
3131
+  fi
3132
+  if grep -Fxq "install_owncloud_music_app" $COMPLETION_FILE; then
3133
+      return
3134
+  fi
3135
+
3136
+  cd /usr/share/owncloud/apps
3137
+  git clone https://github.com/owncloud/music music
3138
+
3139
+  if grep -q "Music player in Owncloud" /home/$MY_USERNAME/README; then
3140
+      echo '' >> /home/$MY_USERNAME/README
3141
+      echo '' >> /home/$MY_USERNAME/README
3142
+      echo 'Music player in Owncloud' >> /home/$MY_USERNAME/README
3143
+      echo '========================' >> /home/$MY_USERNAME/README
3144
+      echo 'To enable the music app within ouwncloud log in to the Owncloud' >> /home/$MY_USERNAME/README
3145
+      echo 'administrator account then go to Apps on the left hand dropdown' >> /home/$MY_USERNAME/README
3146
+      echo 'menu and enable the music app.  You can then log out and log back' >> /home/$MY_USERNAME/README
3147
+      echo 'in as your Owncloud user and select music from the left hand' >> /home/$MY_USERNAME/README
3148
+      echo 'dropdown menu.' >> /home/$MY_USERNAME/README
3149
+  fi
3150
+
3151
+  echo 'install_owncloud_music_app' >> $COMPLETION_FILE
3152
+}
3153
+
3128
 function install_owncloud {
3154
 function install_owncloud {
3129
   if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
3155
   if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" ]]; then
3130
       return
3156
       return
3133
   OWNCLOUD_COMPLETION_MSG2="Open $OWNCLOUD_DOMAIN_NAME in a web browser to complete the setup"
3159
   OWNCLOUD_COMPLETION_MSG2="Open $OWNCLOUD_DOMAIN_NAME in a web browser to complete the setup"
3134
   if grep -Fxq "install_owncloud" $COMPLETION_FILE; then
3160
   if grep -Fxq "install_owncloud" $COMPLETION_FILE; then
3135
       if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" ]]; then
3161
       if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" ]]; then
3162
+		  install_owncloud_music_app
3136
           create_backup_script
3163
           create_backup_script
3137
           create_restore_script
3164
           create_restore_script
3138
           backup_to_friends_servers
3165
           backup_to_friends_servers
3347
   echo 'install_owncloud' >> $COMPLETION_FILE
3374
   echo 'install_owncloud' >> $COMPLETION_FILE
3348
 
3375
 
3349
   if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" ]]; then
3376
   if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" ]]; then
3377
+      install_owncloud_music_app
3350
       create_backup_script
3378
       create_backup_script
3351
       create_restore_script
3379
       create_restore_script
3352
       backup_to_friends_servers
3380
       backup_to_friends_servers
4846
       echo 'git stash drop' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4874
       echo 'git stash drop' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4847
       echo 'git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4875
       echo 'git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4848
   fi
4876
   fi
4877
+  if grep -Fxq "install_owncloud_music_app" $COMPLETION_FILE; then
4878
+      echo "cd /usr/share/owncloud/apps/music" >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4879
+      echo 'git stash' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4880
+      echo 'git stash drop' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4881
+      echo 'git pull' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4882
+  fi
4849
   echo 'exit 0' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4883
   echo 'exit 0' >> /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4850
   chmod +x /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4884
   chmod +x /etc/cron.weekly/$UPGRADE_SCRIPT_NAME
4851
   echo 'create_upgrade_script' >> $COMPLETION_FILE
4885
   echo 'create_upgrade_script' >> $COMPLETION_FILE
4947
 install_web_server
4981
 install_web_server
4948
 configure_firewall_for_web_server
4982
 configure_firewall_for_web_server
4949
 install_owncloud
4983
 install_owncloud
4984
+install_owncloud_music_app
4950
 install_xmpp
4985
 install_xmpp
4951
 configure_firewall_for_xmpp
4986
 configure_firewall_for_xmpp
4952
 install_irc_server
4987
 install_irc_server