Last active
October 9, 2025 17:53
-
Star
(177)
You must be signed in to star a gist -
Fork
(29)
You must be signed in to fork a gist
-
-
Save jacobblock/4d9270c25548c65300dd to your computer and use it in GitHub Desktop.
Revisions
-
jacobblock revised this gist
Jan 9, 2017 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -356,10 +356,10 @@ adduser # backup with Uid 1002 ``` Download the java runtime in order to please the CrashPlan overlords (or alternatively, modify the crashplan port scripts): http://www.oracle.com/technetwork/java/javase/downloads/index.html Scroll down to Java SE 8u111/112 and click JRE Download (third button). Accept the license and download jdk-8u112-linux-i586.tar.gz. Then scp or ftp it over: ``` scp ~/Downloads/jdk-8u112-linux-i586.tar.gz [email protected]:/mnt/tetra/backup_jail/usr/ports/distfiles/ ``` This is just to appease the makefile, and instead we will use OpenJDK's JRE anyways. The following takes quite a while to install. @@ -372,14 +372,15 @@ sysrc crashplan_enable=YES Now change the default Java binary path: ``` vi /usr/local/share/crashplan/install.vars JAVACOMMON=/usr/local/bin/java ``` Restart the jail. Now follow [this guide](http://support.code42.com/CrashPlan/Latest/Configuring/Configuring_A_Headless_Client) to modify your current crashplan install to work on the remote machine. You will need to create a port bridge over ssh, which you can do with the following command (before starting up crashplan locally): ``` ssh -L 4200:localhost:4243 [email protected] ``` And grab the file /var/lib/crashplan/.ui_info from the server and bring it to your local host where you will run the crashplan desktop client. Helpful codes ------------- -
jacobblock revised this gist
Dec 27, 2016 . 2 changed files with 28 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,7 @@ ToC + [Madsonic](#madsonic) + [Headphones](#headphones) + [Plex](#plex) + [PlexPy](#plexpy) + [Deluge](#deluge) + [Nginx Webserver](#webserver) + [Calibre](#calibre) @@ -153,6 +154,20 @@ sysrc plexmediaserver_group=media There has been new security settings added and there was a problem with the plex scanner making a request to a local agent. To fix it you should add `192.168.1.0/24` to Settings -> Server -> Network -> Enabled Advanced -> "List of IP Address and networks that are allowed without auth" add `192.168.1.0/24`. After that, click refresh all and the scanner should be able to connect to the local agent. <a name="plexpy"></a> **PlexPy** ``` cd /usr/local && git clone https://github.com/JonnyWong16/plexpy.git chown -R media:media plexpy cp /usr/local/plexpy/init-scripts/init.freebsd /usr/local/etc/rc.d/plexpy chmod +x /usr/local/etc/rc.d/plexpy sysrc plexpy_enable=YES sysrc plexpy_user=media sysrc plexpy_dir=/usr/local/plexpy sysrc plexpy_port=8083 ``` <a name="madsonic"></a> **Madsonic** @@ -280,6 +295,7 @@ service php-fpm start service postgres start service calibre start service madsonic start service plexpy start ``` Now check to make sure everything is running fine (<a href="http://192.168.1.3">192.168.1.3</a>). Then shut down the plugin server and start it up again. Everything should still be working fine. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,6 +41,15 @@ width: 80px; height: 40px; } .nav-tabs>li>a.plexpy_logo { background: url("http://192.168.1.3:32400/web/img/base/plex-logo.96faf245690b14fdd33eccd3294ac57f.svg") no-repeat top right; background-color: #1f1f1f; background-size: contain; float: left; width: 80px; height: 40px; } .nav-tabs>li>a.calibre_logo { background: url("http://192.168.1.3:8082/static/calibre_banner.png") no-repeat top right; @@ -71,7 +80,8 @@ <li class="active"><a href="#home" data-toggle="tab">Home</a></li> <li><a href="#freenas" data-toggle="tab" class="freenas_logo"></a></li> <li><a href="#freenasftp" data-toggle="tab">NAS FTP</a></li> <li><a href="#plex" data-toggle="tab" class="plex_logo" alt="Plex">Plex</a></li> <li><a href="#plexpy" data-toggle="tab" class="plexpy_logo" alt="PlexPy">PlexPy</a></li> <li><a href="#sabnzbd" data-toggle="tab" class="sabnzbd_logo" alt="Sabnzbd"></a></li> <li><a href="#sickrage" data-toggle="tab">Sickrage</a></li> <li><a href="#sonarr" data-toggle="tab">Sonarr</a></li> @@ -96,6 +106,7 @@ <div class="tab-pane" id="couchpotato" data-src="http://192.168.1.3:5050"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="headphones" data-src="http://192.168.1.3:8181"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="plex" data-src="http://192.168.1.3:32400/web/"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="plexpy" data-src="http://192.168.1.3:8083"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="deluge" data-src="http://192.168.1.3:8112"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="calibre" data-src="http://192.168.1.3:8082"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="ttrss" data-src="http://192.168.1.3/tt-rss/"><iframe src="" allowfullscreen></iframe></div> -
jacobblock revised this gist
Oct 29, 2016 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -141,6 +141,7 @@ sysrc headphones_group=media <a name="plex"></a> **Plex** ``` cd /usr/ports/multimedia/plexmediaserver && make config-recursive install clean cd /usr/local && mkdir plexdata @@ -150,6 +151,8 @@ sysrc plexmediaserver_user=media sysrc plexmediaserver_group=media ``` There has been new security settings added and there was a problem with the plex scanner making a request to a local agent. To fix it you should add `192.168.1.0/24` to Settings -> Server -> Network -> Enabled Advanced -> "List of IP Address and networks that are allowed without auth" add `192.168.1.0/24`. After that, click refresh all and the scanner should be able to connect to the local agent. <a name="madsonic"></a> **Madsonic** -
jacobblock revised this gist
Oct 29, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -181,7 +181,7 @@ Here is the [madsonic launch script](#file-madsonic) to use. Uncheck option for GTK during configuration. ``` cd /usr/ports/net-p2p/deluge-cli && make WITHOUT_X11=yes config-recursive install clean mkdir -p /usr/local/deluge chown -R media:media /usr/local/deluge sysrc deluged_enable=YES @@ -375,7 +375,7 @@ ntfs-3g -o permissions /dev/da1s1 /mnt/usb <a name="upgrading"></a> Upgrading ========= Upgrading can be a royal pain... but fear not. Typically you can just run a portmaster -ad, and if it says "conflict... blah blah" just run "pkg delete -f <stupid old package>" then re-run the portmaster command. Eventually everything should be updated! Many times the update process comes to a grinding halt because of dependency issues. You can kick off a single app to be updated similar below. You will also want to review /usr/ports/UPDATING if you run into trouble to see if a port has changed. There is usually a command to migrate a package such as a `portmaster -o oldpackage newpackage`. ``` less /usr/ports/UPDATING portsnap fetch update -
jacobblock revised this gist
Oct 9, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -381,6 +381,7 @@ less /usr/ports/UPDATING portsnap fetch update cd /usrports/ports-mgmt/pkg && make install clean cd /usr/ports/ports-mgmt/portmaster && make install clean pkg version -l '<' portmaster -Rafd portmaster -fd news/sabnzbdplus ``` -
jacobblock revised this gist
Oct 4, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,8 +17,8 @@ } .nav-tabs>li>a.sabnzbd_logo { background: url("http://192.168.1.3:8080/static/images/logo.png") no-repeat top right; background-position: 0 0px; float: left; height: 40px; padding-left: 50px; -
jacobblock revised this gist
Oct 4, 2016 . 1 changed file with 12 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,10 @@ ToC + [Calibre](#calibre) + [TT-RSS](#tt-rss) + [NextCloud](#nextcloud) + [Testing](#testing) + [Backups](#backups) + [Crashplan](#crashplan) + [Appendix](#appendix) Notes ----- @@ -230,6 +233,8 @@ passwd Modify nginx.conf similar to the attached [nginx.conf](#file-nginx-conf) file. Make sure to pay close attention to where "root" is and "location ~ \.php$". You can overwrite the file with ":wq!" Create a similar [index.html](#file-index-html) as below in folder /usr/local/www. <a name="nextcloud"></a> **NextCloud** ``` @@ -256,6 +261,7 @@ chown -R www:www /usr/local/www/tt-rss rm /usr/local/www/tt-rss/config.php ``` <a name="testing"></a> Testing ------- ``` @@ -275,7 +281,7 @@ service madsonic start Now check to make sure everything is running fine (<a href="http://192.168.1.3">192.168.1.3</a>). Then shut down the plugin server and start it up again. Everything should still be working fine. <a name="Backups"></a> Backups ------- @@ -299,6 +305,7 @@ cp /mnt/tetra/plugins_1/usr/local/CouchPotatoServer/data/couchpotato.db /mnt/tet Make sure your settings move across the boundary. Daemons might not start up if ip's, filepaths, etc. are different. <a name="crashplan"></a> **Crashplan** *Create a jail using the FreeNAS web UI* @@ -365,6 +372,7 @@ ntfs-3g /dev/da1s1 /mnt/usb ntfs-3g -o permissions /dev/da1s1 /mnt/usb ``` <a name="upgrading"></a> Upgrading ========= Upgrading can be a royal pain... but fear not. Typically you can just run a portmaster -ad, and if it says "conflict... blah blah" just run "pkg delete -f <stupid old package>" then re-run the portmaster command. Eventually everything should be updated! Many times the update process comes to a grinding halt because of dependency issues. You can kick off a single app to be updated similar below. @@ -409,6 +417,7 @@ rsync -aqz couchpotato/settings.conf couchpotato/couchpotato.db /mnt/tetra/media cd /usr/local && chmod -R media:media sabnzbd sickbeard headphones CouchPotatoServer ``` <a name="appendix"></a> Appendix ========= 2016-10-04: SickRageTV was forked to SickRage. Please read about migration [here](https://idmedia.no/general/sickrage-dead-long-live-sickrage/). -
jacobblock revised this gist
Oct 4, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -103,7 +103,7 @@ sysrc sabnzbd_group=media <a name="sickrage"></a> **SickRage** ``` cb /usr/local && git clone git://github.com/SickRage/SickRage.git sickrage chown -R media:media sickrage cp /usr/local/sickrage/runscripts/init.freebsd /usr/local/etc/rc.d/sickrage sysrc sickrage_enable=YES @@ -408,3 +408,7 @@ rsync -aqz couchpotato/settings.conf couchpotato/couchpotato.db /mnt/tetra/media cd /usr/local && chmod -R media:media sabnzbd sickbeard headphones CouchPotatoServer ``` Notes ========= 2016-10-04: SickRageTV was forked to SickRage. Please read about migration [here](https://idmedia.no/general/sickrage-dead-long-live-sickrage/). -
jacobblock revised this gist
Oct 4, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,7 +39,7 @@ status_cmd="${name}_status" stop_cmd="${name}_stop" command=$madsonic_bin command_args="--pidfile=${madsonic_pidfile} --home=${madsonic_home} --port=${madsonic_port} --default-music-folder=${madsonic_music_folder} --default-podcast-folder=${madsonic_podcast_folder} --default-playlist-import-folder=${madsonic_playlist_import_folder} --default-playlist-export-folder=${madsonic_playlist_export_folder} --default-playlist-backup-folder=${madsonic_playlist_backup_folder}" verify_pid() { pid=`cat ${madsonic_pidfile} 2>/dev/null` -
jacobblock revised this gist
Sep 17, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -367,13 +367,14 @@ ntfs-3g -o permissions /dev/da1s1 /mnt/usb Upgrading ========= Upgrading can be a royal pain... but fear not. Typically you can just run a portmaster -ad, and if it says "conflict... blah blah" just run "pkg delete -f <stupid old package>" then re-run the portmaster command. Eventually everything should be updated! Many times the update process comes to a grinding halt because of dependency issues. You can kick off a single app to be updated similar below. ``` less /usr/ports/UPDATING portsnap fetch update cd /usrports/ports-mgmt/pkg && make install clean cd /usr/ports/ports-mgmt/portmaster && make install clean portmaster -Rafd portmaster -fd news/sabnzbdplus ``` Rsync files -
jacobblock revised this gist
Aug 28, 2016 . 2 changed files with 110 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ ToC + [Nginx Webserver](#webserver) + [Calibre](#calibre) + [TT-RSS](#tt-rss) + [NextCloud](#nextcloud) Notes @@ -230,10 +230,10 @@ passwd Modify nginx.conf similar to the attached [nginx.conf](#file-nginx-conf) file. Make sure to pay close attention to where "root" is and "location ~ \.php$". You can overwrite the file with ":wq!" Create a similar [index.html](#file-index-html) as below in folder /usr/local/www. <a name="nextcloud"></a> **NextCloud** ``` cd /usr/ports/www/nextcloud && make config-recursive install clean su pgsql createdb ocdb psql -s ocdb This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ http { #gzip on; server { root /usr/local/www; listen 80; server_name localhost; @@ -45,5 +45,110 @@ http { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location = /robots.txt { allow all; log_not_found off; access_log off; } location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { deny all; } location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { deny all; } # The following 2 rules are only needed for the user_webfinger app. # Uncomment it if you're planning to use this app. # rewrite ^/.well-known/host-meta /nextcloud/public.php?service=host-meta # last; #rewrite ^/.well-known/host-meta.json # /nextcloud/public.php?service=host-meta-json last; location = /.well-known/carddav { return 301 $scheme://$host/nextcloud/remote.php/dav; } location = /.well-known/caldav { return 301 $scheme://$host/nextcloud/remote.php/dav; } location /.well-known/acme-challenge { } location ^~ /nextcloud { # set max upload size client_max_body_size 512M; fastcgi_buffers 64 4K; # Disable gzip to avoid the removal of the ETag header gzip off; # Uncomment if your server is build with the ngx_pagespeed module # This module is currently not supported. #pagespeed off; error_page 403 /nextcloud/core/templates/403.php; error_page 404 /nextcloud/core/templates/404.php; location /nextcloud { rewrite ^ /nextcloud/index.php$uri; } location ~ ^/nextcloud/(?:build|tests|config|lib|3rdparty|templates|data)/ { deny all; } location ~ ^/nextcloud/(?:\.|autotest|occ|issue|indie|db_|console) { deny all; } location ~ ^/nextcloud/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) { include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param HTTPS off; #Avoid sending the security headers twice fastcgi_param modHeadersAvailable true; fastcgi_param front_controller_active true; fastcgi_pass 127.0.0.1:9000; fastcgi_intercept_errors on; fastcgi_request_buffering off; } location ~ ^/nextcloud/(?:updater|ocs-provider)(?:$|/) { try_files $uri/ =404; index index.php; } # Adding the cache control header for js and css files # Make sure it is BELOW the PHP block location ~* \.(?:css|js)$ { try_files $uri /nextcloud/index.php$uri$is_args$args; add_header Cache-Control "public, max-age=7200"; # Add headers to serve security related headers (It is intended # to have those duplicated to the ones above) # Before enabling Strict-Transport-Security headers please read # into this topic first. # add_header Strict-Transport-Security "max-age=15768000; # includeSubDomains; preload;"; add_header X-Content-Type-Options nosniff; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; # Optional: Don't log access to assets access_log off; } location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ { try_files $uri /nextcloud/index.php$uri$is_args$args; # Optional: Don't log access to other assets access_log off; } } } } -
jacobblock revised this gist
Jul 15, 2016 . 1 changed file with 114 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,117 @@ <html> <head> <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <style> .fluid-container { padding-left: 15px; padding-right: 15px; margin-left: auto; margin-right: auto; } iframe { width: 100%; height: 100%; } .nav-tabs>li>a.sabnzbd_logo { background: url("http://192.168.1.3:8080/static/stylesheets/colorschemes/gold/images/sprite-main.png") no-repeat top right; background-position: 0 -997px; float: left; height: 40px; padding-left: 50px; padding-right: 50px; } .nav-tabs>li>a.headphones_logo { background: url("http://192.168.1.3:8181/images/headphoneslogo.png") no-repeat top right; background-size: contain; float: left; width: 40px; height: 40px; } .nav-tabs>li>a.plex_logo { background: url("http://192.168.1.3:32400/web/img/base/plex-logo.96faf245690b14fdd33eccd3294ac57f.svg") no-repeat top right; background-color: #1f1f1f; background-size: contain; float: left; width: 80px; height: 40px; } .nav-tabs>li>a.calibre_logo { background: url("http://192.168.1.3:8082/static/calibre_banner.png") no-repeat top right; background-size: contain; height: 40px; width: 150px; } .nav-tabs>li>a.madsonic_logo { background: url("http://192.168.1.3:4040/icons/madsonic_sunny/logo.png") no-repeat top right; background-size: contain; height: 40px; width: 160px; } .nav-tabs>li>a.freenas_logo { background: url("http://192.168.1.2/static/images/ui/freenas-logo.png") no-repeat top right; background-size: cover; height: 40px; width: 150px; } </style> <title>Home Media</title> </head> <body> <div> <ul class="nav nav-tabs" id="myTabs"> <li class="active"><a href="#home" data-toggle="tab">Home</a></li> <li><a href="#freenas" data-toggle="tab" class="freenas_logo"></a></li> <li><a href="#freenasftp" data-toggle="tab">NAS FTP</a></li> <li><a href="#plex" data-toggle="tab" class="" alt="Plex">Plex</a></li> <li><a href="#sabnzbd" data-toggle="tab" class="sabnzbd_logo" alt="Sabnzbd"></a></li> <li><a href="#sickrage" data-toggle="tab">Sickrage</a></li> <li><a href="#sonarr" data-toggle="tab">Sonarr</a></li> <li><a href="#couchpotato" data-toggle="tab">Couch Potato</a></li> <li><a href="#headphones" data-toggle="tab" class="headphones_logo" alt="Headphones"></a></li> <li><a href="#deluge" data-toggle="tab">Deluge</a></li> <li><a href="#calibre" data-toggle="tab" class="calibre_logo"></a></li> <li><a href="#ttrss" data-toggle="tab">TT-RSS</a></li> <li><a href="#madsonic" data-toggle="tab" class="madsonic_logo"></a></li> </ul> </div> <div> <div class="tab-content"> <div class="tab-pane active" id="home"> <p>Home!</p> </div> <div class="tab-pane" id="freenas" data-src="http://192.168.1.2"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="freenasftp" data-src="ftp://192.168.1.3"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="sabnzbd" data-src="http://192.168.1.3:8080"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="sickrage" data-src="http://192.168.1.3:8081"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="sonarr" data-src="http://192.168.1.3:8989"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="couchpotato" data-src="http://192.168.1.3:5050"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="headphones" data-src="http://192.168.1.3:8181"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="plex" data-src="http://192.168.1.3:32400/web/"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="deluge" data-src="http://192.168.1.3:8112"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="calibre" data-src="http://192.168.1.3:8082"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="ttrss" data-src="http://192.168.1.3/tt-rss/"><iframe src="" allowfullscreen></iframe></div> <div class="tab-pane" id="madsonic" data-src="http://192.168.1.3:4040"><iframe src="" allowfullscreen></iframe></div> </div> </div> <script> $(document).ready(function() { $('#myTabs').on('show.bs.tab', function(e) { var paneId = $(e.target).attr('href'); var src = $(paneId).attr('data-src'); if ($(paneId+" iframe").attr("src")=="") { $(paneId+" iframe").attr("src", src); } }); }); </script> </body> </html> -
jacobblock revised this gist
Jul 12, 2016 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -175,7 +175,8 @@ Here is the [madsonic launch script](#file-madsonic) to use. <a name="deluge"></a> **Deluge** Uncheck option for GTK during configuration. ``` cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes config-recursive install clean mkdir -p /usr/local/deluge @@ -377,7 +378,7 @@ portmaster -Rafd Rsync files ``` &rsync --progress --stats --recursive --times --perms --links --dry-run /mnt/tetra /mnt/usb/tetra nohup foo & rsync -az -H --delete --numeric-ids --stats --progress -e ssh [email protected]:/mnt/tetra/family /media/jacob/usb/tetra -
jacobblock revised this gist
Jul 12, 2016 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -120,6 +120,7 @@ cp /usr/local/couchpotato/init/freebsd /usr/local/etc/rc.d/couchpotato chmod +x /usr/local/etc/rc.d/couchpotato sysrc couchpotato_enable=YES sysrc couchpotato_user=media sysrc couchpotato_group=media sysrc couchpotat_dir=/usr/local/couchpotato ``` @@ -132,6 +133,7 @@ cp /usr/local/headphones/init-scripts/init.freebsd /usr/local/etc/rc.d/headphone chmod +x /usr/local/etc/rc.d/headphones sysrc headphones_enable=YES sysrc headphones_user=media sysrc headphones_group=media ``` <a name="plex"></a> @@ -163,6 +165,7 @@ chmod a+x /usr/local/etc/rc.d/madsonic sysrc madsonic_enable=YES sysrc madsonic_user=media sysrc madsonic_group=media sysrc madsonic_bin=/usr/local/madsonic/madsonic.sh sysrc madsonic_podcast_folder=/mnt/media/music/podcasts sysrc madsonic_playlist_folder=/mnt/media/music/playlists @@ -179,9 +182,11 @@ mkdir -p /usr/local/deluge chown -R media:media /usr/local/deluge sysrc deluged_enable=YES sysrc deluged_user=media sysrc deluged_group=media sysrc deluged_confdir=/usr/local/deluge sysrc deluge_web_enable=YES sysrc deluge_web_user=media sysrc deluge_web_group=media sysrc deluge_web_confdir=/usr/local/deluge ``` @@ -193,6 +198,7 @@ cd /usr/ports/deskutils/calibre && make config-recursive && make install clean sysrc calibre_enable=YES sysrc calibre_port=8082 sysrc calibre_user=media sysrc calibre_group=media sysrc calibre_library=/mnt/media/books ``` @@ -208,7 +214,7 @@ cd /usr/ports/databases/mysql56-server && make config-recursive install clean cd /usr/ports/databases/postgresql94-server && make config-recursive install clean cd /usr/ports/lang/php56-extensions && make config-recursive install clean cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini cd /usr/local/etc/nginx && cp nginx.conf-dist nginx.conf && cp mime.types-dist mime.types sysrc nginx_enable=YES sysrc php_fpm_enable=YES sysrc mysql_enable=YES -
jacobblock revised this gist
Jul 12, 2016 . 3 changed files with 18 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -147,7 +147,8 @@ sysrc plexmediaserver_group=media <a name="madsonic"></a> **Madsonic** Discovered madsonic only recently (quite a surprise!). Looks like a great fork of subsonic that includes a number of features for free compared to subsonic. The port depends on jetty server and other stuff. I prefer to use openjdk and a standalone install as done below. Use the madsonic start script also attached to the gist. ``` cd /usr/ports/java/openjdk8-jre && make config-recursive install clean mkdir -p /usr/local/madsonic && cd /usr/local/madsonic @@ -262,7 +263,7 @@ service nginx start service php-fpm start service postgres start service calibre start service madsonic start ``` Now check to make sure everything is running fine (<a href="http://192.168.1.3">192.168.1.3</a>). Then shut down the plugin server and start it up again. Everything should still be working fine. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ <li><a href="http://192.168.1.3:8112">Deluge</a></li> <li><a href="http://192.168.1.3:8082">Calibre</a></li> <li><a href="http://192.168.1.3/tt-rss/">TT-RSS</a></li> <li><a href="http://192.168.1.3:4040">Madsonic</a></li> </ul> </body> </html> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,31 +12,34 @@ # # madsonic_user="username" # Default is "root" # madsonic_bin="/path/to/madsonic.sh" # Default is "/usr/local/sbin/madsonic.sh" . /etc/rc.subr name="madsonic" rcvar="${name}_enable" load_rc_config $name required_files=$madsonic_bin : ${madsonic_enable="NO"} : ${madsonic_user="root"} : ${madsonic_port="4040"} : ${madsonic_home="/usr/local/madsonic"} : ${madsonic_bin="${madsonic_home}/madsonic.sh"} : ${madsonic_music_folder="/mnt/media/music"} : ${madsonic_podcast_folder="${madsonic_music_folder}/podcasts"} : ${madsonic_playlist_folder="${madsonic_music_folder}/playlists"} : ${madsonic_playlist_import_folder="${madsonic_playlist_folder}/import"} : ${madsonic_playlist_export_folder="${madsonic_playlist_folder}/export"} : ${madsonic_playlist_backup_folder="${madsonic_playlist_folder}/backup"} : ${madsonic_pidfile="${madsonic_home}/madsonic.pid"} status_cmd="${name}_status" stop_cmd="${name}_stop" command=$madsonic_bin command_args="--pidfile=${madsonic_pidfile} --home=${madsonic_home} --port={madsonic_port} --default-music-folder=${madsonic_music_folder} --default-podcast-folder=${madsonic_podcast_folder} --default-playlist-import-folder=${madsonic_playlist_import_folder} --default-playlist-export-folder=${madsonic_playlist_export_folder} --default-playlist-backup-folder=${madsonic_playlist_backup_folder}" verify_pid() { pid=`cat ${madsonic_pidfile} 2>/dev/null` @@ -52,6 +55,8 @@ madsonic_stop() { wait_for_pids ${pid} echo "Stopped" fi rm -f ${madsonic_pidfile} } madsonic_status() { -
jacobblock revised this gist
Jul 12, 2016 . 3 changed files with 79 additions and 79 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ ToC + [Couch Potato](#couch_potato) + [SickRage](#sickrage) + [Sabnzbd](#sabnzbd) + [Madsonic](#madsonic) + [Headphones](#headphones) + [Plex](#plex) + [Deluge](#deluge) @@ -145,29 +145,29 @@ sysrc plexmediaserver_user=media sysrc plexmediaserver_group=media ``` <a name="madsonic"></a> **Madsonic** Discovered madsonic only recently (quite a surprise!). Looks like a great fork of subsonic that includes a number of features for free compared to subsonic. The port depends on jetty server and other stuff. I prefer to use openjdk and a standalone install as done below. Use the subsonic start script also attached to the gist. ``` cd /usr/ports/java/openjdk8-jre && make config-recursive install clean mkdir -p /usr/local/madsonic && cd /usr/local/madsonic wget -Omadsonic.tar.gz http://madsonic.org/download/6.0/20160122_madsonic-6.0.7960-standalone.zip tar -zxvf madsonic.tar.gz rm madsonic.tar.gz chown -R media:media /usr/local/madsonic vi /usr/local/etc/rc.d/madsonic # Use the file "madsonic" attached below chmod a+x /usr/local/etc/rc.d/madsonic sysrc madsonic_enable=YES sysrc madsonic_user=media sysrc madsonic_bin=/usr/local/madsonic/madsonic.sh sysrc madsonic_podcast_folder=/mnt/media/music/podcasts sysrc madsonic_playlist_folder=/mnt/media/music/playlists ``` Here is the [madsonic launch script](#file-madsonic) to use. <a name="deluge"></a> **Deluge** This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,61 @@ #!/bin/sh # # PROVIDE: madsonic # REQUIRE: LOGIN DAEMON NETWORKING # KEYWORD: shutdown # # To enable madsonic, add this line to your /etc/rc.conf: # # madsonic_enable="YES" # # And optionally these line: # # madsonic_user="username" # Default is "root" # madsonic_bin="/path/to/madsonic.sh" # Default is "/usr/local/sbin/madsonic.sh" . /etc/rc.subr name="madsonic" rcvar="madsonic_enable" load_rc_config $name required_files=$madsonic_bin : ${madsonic_enable="NO"} : ${madsonic_user="root"} : ${madsonic_port="4040"} : ${madsonic_home="/usr/local/madsonic"} : ${madsonic_bin="${madsonic_home}/madsonic.sh"} : ${madsonic_music_folder="/mnt/media/music"} : ${madsonic_podcast_folder="/mnt/media/music/podcasts"} : ${madsonic_playlist_folder="/mnt/media/music/playlists"} : ${madsonic_pidfile="${madsonic_home}/madsonic.pid"} status_cmd="${name}_status" stop_cmd="${name}_stop" command=$madsonic_bin command_args="--pidfile=${madsonic_pidfile} --home=${madsonic_home} --port={madsonic_port} --default-music-folder=${madsonic_music_folder} --default-podcast-folder=${madsonic_podcast_folder} --default-playlist-folder=${madsonic_playlist_folder}" verify_pid() { pid=`cat ${madsonic_pidfile} 2>/dev/null` ps -p ${pid} | grep -q "madsonic" return $? } madsonic_stop() { echo "Stopping ${name}" verify_pid if [ -n "${pid}" ]; then kill ${sig_stop} ${pid} wait_for_pids ${pid} echo "Stopped" fi } madsonic_status() { verify_pid && echo "${name} is running as ${pid}" || echo "${name} is not running" } run_rc_command "$1" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,61 +0,0 @@ -
jacobblock revised this gist
Jul 12, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -128,7 +128,7 @@ sysrc couchpotat_dir=/usr/local/couchpotato ``` cd /usr/local && git clone git://github.com/rembo10/headphones.git chown -R media:media headphones cp /usr/local/headphones/init-scripts/init.freebsd /usr/local/etc/rc.d/headphones chmod +x /usr/local/etc/rc.d/headphones sysrc headphones_enable=YES sysrc headphones_user=media -
jacobblock revised this gist
Jan 14, 2016 . 2 changed files with 50 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -55,8 +55,8 @@ ssh [email protected] jls jexec 17 tcsh passwd portsnap fetch extract portsnap fetch update sysrc sshd_enable=YES sysrc ftpd_enable=YES cd /usr/ports/ports-mgmt/pkg/ && make deinstall @@ -94,7 +94,6 @@ Software **Sabnzbd** ``` cd /usr/ports/news/sabnzbdplus && make config-recursive install clean chown -R media:media sabnzbd sysrc sabnzbd_enable=YES sysrc sabnzbd_user=media @@ -104,30 +103,32 @@ sysrc sabnzbd_group=media <a name="sickrage"></a> **SickRage** ``` cd /usr/local && git clone git://github.com/SiCKRAGETV/SickRage.git sickrage chown -R media:media sickrage cp /usr/local/sickrage/runscripts/init.freebsd /usr/local/etc/rc.d/sickrage sysrc sickrage_enable=YES sysrc sickrage_user=media sysrc sickrage_group=media ``` <a name="couch_potato"></a> **Couch Potato** ``` cd /usr/local && git clone git://github.com/RuudBurger/CouchPotatoServer.git couchpotato chown -R media:media couchpotato cp /usr/local/couchpotato/init/freebsd /usr/local/etc/rc.d/couchpotato chmod +x /usr/local/etc/rc.d/couchpotato sysrc couchpotato_enable=YES sysrc couchpotato_user=media sysrc couchpotat_dir=/usr/local/couchpotato ``` <a name="headphones"></a> **Headphones** ``` cd /usr/local && git clone git://github.com/rembo10/headphones.git chown -R media:media headphones cp /usr/local/headphones/init-scripts/init-alt.freebsd /usr/local/etc/rc.d/headphones chmod +x /usr/local/etc/rc.d/headphones sysrc headphones_enable=YES sysrc headphones_user=media @@ -139,17 +140,18 @@ sysrc headphones_user=media cd /usr/ports/multimedia/plexmediaserver && make config-recursive install clean cd /usr/local && mkdir plexdata chown -R media:media plexdata sysrc plexmediaserver_enable=YES sysrc plexmediaserver_user=media sysrc plexmediaserver_group=media ``` <a name="subsonic"></a> **Subsonic** The port depends on jetty server and other stuff. I prefer to use openjdk and a standalone install as done below. Use the subsonic start script also attached to the gist. ``` cd /usr/ports/java/openjdk8-jre && make config-recursive install clean mkdir -p /usr/local/subsonic && cd /usr/local/subsonic/ wget -Osubsonic.tar.gz http://subsonic.org/download/subsonic-5.3-standalone.tar.gz tar -zxvf subsonic.tar.gz rm subsonic.tar.gz chown -R media:media /usr/local/subsonic @@ -160,7 +162,7 @@ chmod a+x /usr/local/etc/rc.d/subsonic sysrc subsonic_enable=YES sysrc subsonic_user=media sysrc subsonic_bin=/usr/local/subsonic/subsonic.sh sysrc subsonic_podcast_folder=/mnt/media/music/podcasts sysrc subsonic_playlist_folder=/mnt/media/music/playlists ``` @@ -185,7 +187,6 @@ sysrc deluge_web_confdir=/usr/local/deluge <a name="calibre"></a> **Calibre** ``` cd /usr/ports/deskutils/calibre && make config-recursive && make install clean sysrc calibre_enable=YES This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,12 +24,38 @@ required_files=$subsonic_bin : ${subsonic_enable="NO"} : ${subsonic_user="root"} : ${subsonic_port="4040"} : ${subsonic_home="/usr/local/subsonic"} : ${subsonic_bin="${subsonic_home}/subsonic.sh"} : ${subsonic_music_folder="/mnt/media/music"} : ${subsonic_podcast_folder="/mnt/media/music/podcasts"} : ${subsonic_playlist_folder="/mnt/media/music/playlists"} : ${subsonic_pidfile="${subsonic_home}/subsonic.pid" status_cmd="${name}_status" stop_cmd="${name}_stop" command=$subsonic_bin command_args="--pidfile=${subsonic_pidfile} --home=${subsonic_home} --port={subsonic_port} --default-music-folder=${subsonic_music_folder} --default-podcast-folder=${subsonic_podcast_folder} --default-playlist-folder=${subsonic_playlist_folder}" verify_pid() { pid=`cat ${subsonic_pidfile} 2>/dev/null` ps -p ${pid} | grep -q "subsonic" return $? } subsonic_stop() { echo "Stopping ${name}" verify_pid if [ -n "${pid}" ]; then kill ${sig_stop} ${pid} wait_for_pids ${pid} echo "Stopped" fi } subsonic_status() { verify_pid && echo "${name} is running as ${pid}" || echo "${name} is not running" } run_rc_command "$1" -
jacobblock revised this gist
Mar 30, 2015 . 2 changed files with 35 additions and 24 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ Gist is awesome, and currently this write-up is written in Markdown. Unfortunate Along with that be sure to keep paths consistent between your builds. It is easy to forget if you SSH'd into FreeNAS or into the jail. Additionally, **do not copy/paste entire chunks of commands**. I often skip over different yes/no options for brevity in this guide. Read what the prompt says and feel free to drop a comment if answers seem ambiguous. Setting up the jail @@ -46,6 +46,7 @@ autostart: checked type: pluginjail VIMAGE: unchecked vanilla: checked sysctls: allow.raw_sockets=true,allow.sysvipc=true ``` **Ports and dependencies<a name="#dependencies">** @@ -61,6 +62,7 @@ sysrc ftpd_enable=YES cd /usr/ports/ports-mgmt/pkg/ && make deinstall cd /usr/ports/ports-mgmt/pkg/ && make install clean pkg2ng cd /usr/ports/ports-mgmt/portmaster && make config-recursive install clean cd /usr/ports/devel/git && make config-recursive install clean cd /usr/ports/devel/py-cheetah && make config-recursive install clean ``` @@ -192,14 +194,6 @@ sysrc calibre_user=media sysrc calibre_library=/mnt/media/books ``` <a name="webserver"></a> **Nginx webserver + PHP + MYSQL** @@ -208,19 +202,35 @@ For PHP5-extensions, include: bz2 ctype curl ftp dom exif fileinfo gd gmp iconv For PHP5, include: FPM ``` cd /usr/ports/www/nginx && make config-recursive install clean cd /usr/ports/databases/mysql56-server && make config-recursive install clean cd /usr/ports/databases/postgresql94-server && make config-recursive install clean cd /usr/ports/lang/php56-extensions && make config-recursive install clean cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini cd /usr/local/etc/nginx && cp nginx.conf-dist nginx.conf && cp mim.types-dist mime.types sysrc nginx_enable=YES sysrc php_fpm_enable=YES sysrc mysql_enable=YES sysrc postgresql_enable=YES service postgresql initdb service postgresql start service mysql-server start mysql_secure_installation su pgsql passwd ``` Modify nginx.conf similar to the attached [nginx.conf](#file-nginx-conf) file. Make sure to pay close attention to where "root" is and "location ~ \.php$". You can overwrite the file with ":wq!" Create a similar [index.html](#file-index-html) as below in folder /usr/local/www. <a name="owncloud"></a> **OwnCloud** ``` cd /usr/local/www/owncloud && make config-recursive install clean su pgsql createdb ocdb psql -s ocdb create user <user> password <password> GRAND ALL PRIVELEGES ON DATABASE ocdb TO <user> ``` <a name="tt-rss"></a> **Tiny Tiny RSS** @@ -241,16 +251,17 @@ Testing ------- ``` service sshd start service couchpotato start service sickrage start service headphones start service sabnzbd start service plexmediaserver start service deluge start service nginx start service php-fpm start service postgres start service calibre start service subsonic start ``` Now check to make sure everything is running fine (<a href="http://192.168.1.3">192.168.1.3</a>). Then shut down the plugin server and start it up again. Everything should still be working fine. @@ -300,7 +311,7 @@ jls jexec 5 tcsh passwd portsnap fetch && portsnap extract && portsnap update sysrc sshd_enable=YES vi /etc/ssh/sshd_config # add the following to the end of the file Match User backup @@ -321,7 +332,7 @@ Install java and crashplan ``` cd /usr/ports/java/openjdk8-jre/ && make config-recursive && make install clean cd /usr/ports/sysutils/linux-crashplan/ && make config-recursive && make install clean sysrc crashplan_enable=YES ``` Now change the default Java binary path: This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ <li><a href="http://192.168.1.2">FreeNAS</a></li> <li><a href="ftp://192.168.1.3">NAS FTP</a></li> <li><a href="http://192.168.1.3:8080">Sabnzbd</a></li> <li><a href="http://192.168.1.3:8081">SickRage</a></li> <li><a href="http://192.168.1.3:5050">Couch Potato</a></li> <li><a href="http://192.168.1.3:8181">Headphones</a></li> <li><a href="http://192.168.1.3:32400/web/">Plex</a></li> -
jacobblock revised this gist
Mar 29, 2015 . 1 changed file with 21 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ToC + [Dependencies](#dependencies) + [Couch Potato](#couch_potato) + [SickRage](#sickrage) + [Sabnzbd](#sabnzbd) + [Subsonic](#subsonic) + [Headphones](#headphones) @@ -61,8 +61,8 @@ sysrc ftpd_enable=YES cd /usr/ports/ports-mgmt/pkg/ && make deinstall cd /usr/ports/ports-mgmt/pkg/ && make install clean pkg2ng cd /usr/ports/devel/git && make config-recursive install clean cd /usr/ports/devel/py-cheetah && make config-recursive install clean ``` **Create a 'media' user and create media directory** @@ -91,16 +91,16 @@ Software <a name="sabnzbd"></a> **Sabnzbd** ``` cd /usr/ports/news/sabnzbdplus && make config-recursive install clean cd /usr/local && mkdir sabnzbd chown -R media:media sabnzbd sysrc sabnzbd_enable=YES sysrc sabnzbd_user=media sysrc sabnzbd_group=media ``` <a name="sickrage"></a> **SickRage** ``` cd /usr/local && git clone git://github.com/SiCKRAGETV/SickRage.git sickbeard chown -R media:media sickbeard @@ -134,7 +134,7 @@ sysrc headphones_user=media <a name="plex"></a> **Plex** ``` cd /usr/ports/multimedia/plexmediaserver && make config-recursive install clean cd /usr/local && mkdir plexdata chown -R media:media plexdata sysrc plexmediaserver_enable="ES @@ -145,7 +145,7 @@ sysrc plexmediaserver_group=media <a name="subsonic"></a> **Subsonic** ``` cd /usr/ports/java/openjdk6-jre && make config-recursive install clean mkdir -p /usr/local/subsonic/standalone && cd /usr/local/subsonic/standalone wget -Osubsonic.tar.gz http://downloads.sourceforge.net/project/subsonic/subsonic/4.9/subsonic-4.9-standalone.tar.gz tar -zxvf subsonic.tar.gz @@ -169,7 +169,7 @@ Here is the [subsonic launch script](#file-subsonic) to use. **Deluge** Uncheck option for GTK during configuration. ``` cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes config-recursive install clean mkdir -p /usr/local/deluge chown -R media:media /usr/local/deluge sysrc deluged_enable=YES @@ -194,23 +194,22 @@ sysrc calibre_library=/mnt/media/books <a name="owncloud"></a> **OwnCloud** ``` cd /usr/local/www/owncloud && make config-recursive install clean chown -R media:media /usr/local/www/ownlcoud ``` Make sure to add <a name="webserver"></a> **Nginx webserver + PHP + MYSQL** For PHP5-extensions, include: bz2 ctype curl ftp dom exif fileinfo gd gmp iconv json ldap mbstring mcrypt mysql mysqli openssl pdo_mysql pdo_pgsql pdo_sqlite pgsql xsl zip zlib For PHP5, include: FPM ``` cd /usr/ports/www/nginx && make config-recursive install clean cd /usr/ports/lang/php56-extensions && make config-recursive install clean cd /usr/ports/databases/mysql56-server && make config-recursive install clean cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini cd /usr/local/etc/nginx && cp nginx.conf-dist nginx.conf && cp mim.types-dist mime.types sysrc nginx_enable=YES @@ -347,11 +346,14 @@ ntfs-3g -o permissions /dev/da1s1 /mnt/usb ``` Upgrading ========= Upgrading can be a royal pain... but fear not. Typically you can just run a portmaster -ad, and if it says "conflict... blah blah" just run "pkg delete -f <stupid old package>" then re-run the portmaster command. Eventually everything should be updated! ``` less /usr/ports/UPDATING portsnap fetch update cd /usrports/ports-mgmt/pkg && make install clean cd /usr/ports/ports-mgmt/portmaster && make install clean portmaster -Rafd ``` Rsync files @@ -384,4 +386,4 @@ rsync -aqz headphones/config.ini headphones/headphones.db /mnt/tetra/media_jail/ rsync -aqz couchpotato/settings.conf couchpotato/couchpotato.db /mnt/tetra/media_jail/usr/local/CouchPotatoServer/data/ cd /usr/local && chmod -R media:media sabnzbd sickbeard headphones CouchPotatoServer ``` -
jacobblock revised this gist
Mar 28, 2015 . 1 changed file with 36 additions and 33 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,8 +56,11 @@ jexec 17 tcsh passwd portsnap fetch update portsnap extract sysrc sshd_enable=YES sysrc ftpd_enable=YES cd /usr/ports/ports-mgmt/pkg/ && make deinstall cd /usr/ports/ports-mgmt/pkg/ && make install clean pkg2ng cd /usr/ports/devel/git && make config-recursive && make install clean cd /usr/ports/devel/py-cheetah && make install clean ``` @@ -91,9 +94,9 @@ Software cd /usr/ports/news/sabnzbdplus && make config-recursive && make install clean cd /usr/local && mkdir sabnzbd chown -R media:media sabnzbd sysrc sabnzbd_enable=YES sysrc sabnzbd_user=media sysrc sabnzbd_group=media ``` <a name="sick_beard"></a> @@ -102,8 +105,8 @@ echo 'sabnzbd_group="media"' >> /etc/rc.conf cd /usr/local && git clone git://github.com/SiCKRAGETV/SickRage.git sickbeard chown -R media:media sickbeard cp /usr/local/sickrage/init.freebsd /usr/local/etc/rc.d/sickrage sysrc sickbeard_enable=YES sysrc sickbeard_user=media ``` <a name="couch_potato"></a> @@ -113,8 +116,8 @@ cd /usr/local && git clone git://github.com/RuudBurger/CouchPotatoServer.git chown -R media:media CouchPotatoServer cp /usr/local/CouchPotatoServer/init/freebsd /usr/local/etc/rc.d/couchpotato chmod +x /usr/local/etc/rc.d/couchpotato sysrc couchpotato_enable=YES sysrc couchpotato_user=media ``` <a name="headphones"></a> @@ -124,8 +127,8 @@ cd /usr/local && git clone git://github.com/rembo10/headphones.git chown -R media headphones && chgrp -R media headphones cp /usr/local/headphones/init-alt.freebsd /usr/local/etc/rc.d/headphones chmod +x /usr/local/etc/rc.d/headphones sysrc headphones_enable=YES sysrc headphones_user=media ``` <a name="plex"></a> @@ -134,9 +137,9 @@ echo 'headphones_user="media"' >> /etc/rc.conf cd /usr/ports/multimedia/plexmediaserver && make install clean cd /usr/local && mkdir plexdata chown -R media:media plexdata sysrc plexmediaserver_enable="ES sysrc plexmediaserver_user=media sysrc plexmediaserver_group=media ``` <a name="subsonic"></a> @@ -153,11 +156,11 @@ vi /usr/local/etc/rc.d/subsonic # Use the file "subsonic" attached below chmod a+x /usr/local/etc/rc.d/subsonic sysrc subsonic_enable=YES sysrc subsonic_user=media sysrc subsonic_bin=/usr/local/subsonic/standalone/subsonic.sh sysrc subsonic_podcast_folder=/mnt/media/music/podcasts sysrc subsonic_playlist_folder=/mnt/media/music/playlists ``` Here is the [subsonic launch script](#file-subsonic) to use. @@ -169,12 +172,12 @@ Uncheck option for GTK during configuration. cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes config-recursive && make install clean mkdir -p /usr/local/deluge chown -R media:media /usr/local/deluge sysrc deluged_enable=YES sysrc deluged_user=media sysrc deluged_confdir=/usr/local/deluge sysrc deluge_web_enable=YES sysrc deluge_web_user=media sysrc deluge_web_confdir=/usr/local/deluge ``` <a name="calibre"></a> @@ -183,10 +186,10 @@ echo 'deluge_web_confdir="/usr/local/deluge"' >> /etc/rc.conf Version is a bit old in the repo. Might consider trying to install from source in the future. ``` cd /usr/ports/deskutils/calibre && make config-recursive && make install clean sysrc calibre_enable=YES sysrc calibre_port=8082 sysrc calibre_user=media sysrc calibre_library=/mnt/media/books ``` <a name="owncloud"></a> @@ -210,9 +213,9 @@ cd /usr/ports/lang/php5-extensions && make config-recursive && make install clea cd /usr/ports/databases/mysql56-server && make config-recursive && make install clean cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini cd /usr/local/etc/nginx && cp nginx.conf-dist nginx.conf && cp mim.types-dist mime.types sysrc nginx_enable=YES sysrc php_fpm_enable=YES sysrc mysql_enable=YES /usr/local/etc/rc.d/mysql-server start mysql_secure_installation ``` @@ -226,7 +229,7 @@ Create a similar [index.html](#file-index-html) as below in folder /usr/local/ww Helpful link: http://tt-rss.org/forum/viewtopic.php?f=16&t=911 ``` cd /usr/ports/www/tt-rss && make config-recursive && make install clean sysrc ttrssd_enable=YES mysql -u root -p CREATE DATABASE ttrssdb; GRANT ALL ON ttrssdb.* TO ttrssuser IDENTIFIED BY "pick some random long password with lots of words BLAMMY"; -
jacobblock revised this gist
Mar 27, 2015 . 1 changed file with 9 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -99,9 +99,9 @@ echo 'sabnzbd_group="media"' >> /etc/rc.conf <a name="sick_beard"></a> **Sick Beard** ``` cd /usr/local && git clone git://github.com/SiCKRAGETV/SickRage.git sickbeard chown -R media:media sickbeard cp /usr/local/sickrage/init.freebsd /usr/local/etc/rc.d/sickrage echo 'sickbeard_enable="YES"' >> /etc/rc.conf echo 'sickbeard_user="media"' >> /etc/rc.conf ``` @@ -191,13 +191,17 @@ echo 'calibre_library="/mnt/media/books"' >> /etc/rc.conf <a name="owncloud"></a> **OwnCloud** First install the php packages below from webserver. Then build owncloud. ``` cd /usr/ports/textproc/libxml2/ && make config-recursive && make install clean cd /usr/ports/textproc/php5-xsl/ && make config-recursive && make install clean cd /usr/ports/www/owncloud && make config-recursive && make install clean ``` <a name="webserver"></a> **Nginx webserver + PHP + MYSQL** For PHP5-extensions, include: bz2 curl fileinfo gd mbstring mcrypt mysqli openssl pdo_mysql pdo_pgsql pgsql xsl zip For PHP5, include: FPM ``` @@ -236,7 +240,7 @@ Testing ``` service sshd start /usr/local/etc/rc.d/couchpotato start /usr/local/etc/rc.d/sickrage start /usr/local/etc/rc.d/headphones start /usr/local/etc/rc.d/sabnzbd start /usr/local/etc/rc.d/plexmediaserver start -
jacobblock revised this gist
Mar 26, 2015 . 2 changed files with 15 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ ToC + [Subsonic](#subsonic) + [Headphones](#headphones) + [Plex](#plex) + [Deluge](#deluge) + [Nginx Webserver](#webserver) + [Calibre](#calibre) + [TT-RSS](#tt-rss) @@ -162,20 +162,19 @@ echo 'subsonic_playlist_folder"/mnt/media/music/playlists"' >> /etc/rc.conf Here is the [subsonic launch script](#file-subsonic) to use. <a name="deluge"></a> **Deluge** Uncheck option for GTK during configuration. ``` cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes config-recursive && make install clean mkdir -p /usr/local/deluge chown -R media:media /usr/local/deluge echo 'deluged_enable="YES"' >> /etc/rc.conf echo 'deluged_user="media"' >> /etc/rc.conf echo 'deluged_confdir="/usr/local/deluge"' >> /etc/rc.conf echo 'deluge_web_enable="YES"' >> /etc/rc.conf echo 'deluge_web_user="media"' >> /etc/rc.conf echo 'deluge_web_confdir="/usr/local/deluge"' >> /etc/rc.conf ``` <a name="calibre"></a> @@ -241,7 +240,7 @@ service sshd start /usr/local/etc/rc.d/headphones start /usr/local/etc/rc.d/sabnzbd start /usr/local/etc/rc.d/plexmediaserver start /usr/local/etc/rc.d/deluge start /usr/local/etc/rc.d/nginx start /usr/local/etc/rc.d/php-fpm start /usr/local/etc/rc.d/calibre start This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ <li><a href="http://192.168.1.3:5050">Couch Potato</a></li> <li><a href="http://192.168.1.3:8181">Headphones</a></li> <li><a href="http://192.168.1.3:32400/web/">Plex</a></li> <li><a href="http://192.168.1.3:8112">Deluge</a></li> <li><a href="http://192.168.1.3:8082">Calibre</a></li> <li><a href="http://192.168.1.3/tt-rss/">TT-RSS</a></li> <li><a href="http://192.168.1.3:4040">Subsonic</a></li> -
jacobblock revised this gist
Jan 8, 2015 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,7 @@ ToC + [Nginx Webserver](#webserver) + [Calibre](#calibre) + [TT-RSS](#tt-rss) + [OwnCloud](#owncloud) Notes @@ -189,6 +190,11 @@ echo 'calibre_user="media"' >> /etc/rc.conf echo 'calibre_library="/mnt/media/books"' >> /etc/rc.conf ``` <a name="owncloud"></a> **OwnCloud** cd /usr/ports/www/owncloud && make config-recursive && make install clean <a name="webserver"></a> **Nginx webserver + PHP + MYSQL** @@ -336,10 +342,10 @@ ntfs-3g -o permissions /dev/da1s1 /mnt/usb Upgrading ``` portsnap fetch update cd /usrports/ports-mgmt/pkg && make install clean cd /usr/ports/ports-mgmt/portmaster && make install clean portmaster -Raf ``` Rsync files -
jacobblock revised this gist
Dec 3, 2014 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -334,6 +334,14 @@ ntfs-3g /dev/da1s1 /mnt/usb ntfs-3g -o permissions /dev/da1s1 /mnt/usb ``` Upgrading ``` portsnap fetch upgrade cd /usrports/ports-mgmt/pkg && make install clean cd /usr/ports/ports-mgmt/portmaster && make install clean portmaster -a ``` Rsync files ``` &rsync --progress --stats --recursive --times --perms --links --dry-run /mnt/tetra /mnt/usb/tetra -
jacobblock revised this gist
Nov 3, 2014 . 1 changed file with 39 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -270,8 +270,25 @@ Make sure your settings move across the boundary. Daemons might not start up if **Crashplan** *Create a jail using the FreeNAS web UI* ``` Jail name: backup_jail IPv4 address: 192.168.1./24 autostart: checked type: portjail VIMAGE: unchecked vanilla: checked ``` Now add the directories you want to backup and where the backups should go. **Ports and dependencies** ``` ssh [email protected] jls jexec 5 tcsh passwd portsnap fetch && portsnap extract && portsnap update echo 'sshd_enable="YES"' >> /etc/rc.conf vi /etc/ssh/sshd_config # add the following to the end of the file @@ -280,6 +297,27 @@ Match User backup adduser # backup with Uid 1002 ``` Download the java runtime in order to please the CrashPlan overlords (or alternatively, modify the crashplan port scripts): http://www.oracle.com/technetwork/java/javase/downloads/index.html Scroll down to Java SE 7u71/72 and click JRE Download (third button). Accept the license and download jre-7u71-linux-x64.tar.gz. Then copy it over: ``` scp ~/Downloads/jre-7u71-linux-i586.tar.gz [email protected]:/mnt/tetra/backup_jail/usr/ports/distfiles/ ``` This is just to appease the makefile, and instead we will use OpenJDK's JRE anyways. The following takes quite a while to install. Install java and crashplan ``` cd /usr/ports/java/openjdk8-jre/ && make config-recursive && make install clean cd /usr/ports/sysutils/linux-crashplan/ && make config-recursive && make install clean echo 'crashplan_enable="YES"' >> /etc/rc.conf ``` Now change the default Java binary path: ``` vi /usr/local/crashplan/install.vars JAVACOMMON=/usr/local/bin/java ``` Restart the jail. Now follow [this guide](http://support.code42.com/CrashPlan/Latest/Configuring/Configuring_A_Headless_Client) to modify your current crashplan install to work on the remote machine. You will need to create a port bridge over ssh, which you can do with the following command (before starting up crashplan locally): ``` -
jacobblock revised this gist
Jul 3, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,6 +32,8 @@ Gist is awesome, and currently this write-up is written in Markdown. Unfortunate Along with that be sure to keep paths consistent between your builds. It is easy to forget if you SSH'd into FreeNAS or into the jail. Additionally, **do not copy/paste entire chunks of commands**. I often skip over different yes/no options for brevvity in this guide. Read what the prompt says and feel free to drop a comment if answers seem ambiguous. Setting up the jail ------------------- -
jacobblock created this gist
Jul 3, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,327 @@ FreeNAS ======= I started using FreeNAS in August 2013. It is fantastic piece of software and I have been really impressed by the upgrades just in the few months I've been using it. It looks like they recently went to a plugin system as of version 9 to make installing software easier for end users. I've ran into several issues related to plugins and user + group permissions so I decided to just use the available FreeBSD port system. After fiddling for a few days (now turned into months) I believe I have created something helpful for the community and anyone interested in picking up the port system. The sandbox nature of FreeNAS's jail system is especially helpful for playing around without having any consequence on your core system. Here are straight-forward instructions to setting up a bunch of different software on FreeNAS. If you make a terrible error, just throw up another plugin sandbox and repeat. ToC -------- + [Dependencies](#dependencies) + [Couch Potato](#couch_potato) + [Sick Beard](#sick_beard) + [Sabnzbd](#sabnzbd) + [Subsonic](#subsonic) + [Headphones](#headphones) + [Plex](#plex) + [Transmission](#transmission) + [Nginx Webserver](#webserver) + [Calibre](#calibre) + [TT-RSS](#tt-rss) Notes ----- Gist is awesome, and currently this write-up is written in Markdown. Unfortunately that means you'll have to replace a bunch of references to: + **tetra**: My zpool + **192.168.1.2**: My static FreeNAS ip + **192.168.1.3**: My static media jail ip + **192.168.1.4**: My static backup jail ip Along with that be sure to keep paths consistent between your builds. It is easy to forget if you SSH'd into FreeNAS or into the jail. Setting up the jail ------------------- **Create a jail using the FreeNAS web UI** ``` Jail name: media_jail IPv4 address: 192.168.1.3/24 autostart: checked type: pluginjail VIMAGE: unchecked vanilla: checked ``` **Ports and dependencies<a name="#dependencies">** ``` ssh [email protected] jls jexec 17 tcsh passwd portsnap fetch update portsnap extract echo 'sshd_enable="YES"' >> /etc/rc.conf echo 'ftpd_enable="YES"' >> /etc/rc.conf cd /usr/ports/devel/git && make config-recursive && make install clean cd /usr/ports/devel/py-cheetah && make install clean ``` **Create a 'media' user and create media directory** ``` mkdir /mnt/media adduser Username : media Password : <blank> Full Name : Media Uid : 1001 Class : Groups : media Home : /home/media Home Mode : Shell : /bin/tcsh Locked : no id media ``` Create this user in your FreeNAS with the same uid and gid (typically 1001 if you haven't made a custom account yet). Add mounts for media + crashplan backups inside the jail (/mnt/<ZFS>/media to /mnt/media). Software -------- <a name="sabnzbd"></a> **Sabnzbd** ``` cd /usr/ports/news/sabnzbdplus && make config-recursive && make install clean cd /usr/local && mkdir sabnzbd chown -R media:media sabnzbd echo 'sabnzbd_enable="YES"' >> /etc/rc.conf echo 'sabnzbd_user="media"' >> /etc/rc.conf echo 'sabnzbd_group="media"' >> /etc/rc.conf ``` <a name="sick_beard"></a> **Sick Beard** ``` cd /usr/local && git clone git://github.com/midgetspy/Sick-Beard.git sickbeard chown -R media:media sickbeard cp /usr/local/sickbeard/init.freebsd /usr/local/etc/rc.d/sickbeard echo 'sickbeard_enable="YES"' >> /etc/rc.conf echo 'sickbeard_user="media"' >> /etc/rc.conf ``` <a name="couch_potato"></a> **Couch Potato** ``` cd /usr/local && git clone git://github.com/RuudBurger/CouchPotatoServer.git chown -R media:media CouchPotatoServer cp /usr/local/CouchPotatoServer/init/freebsd /usr/local/etc/rc.d/couchpotato chmod +x /usr/local/etc/rc.d/couchpotato echo 'couchpotato_enable="YES"' >> /etc/rc.conf echo 'couchpotato_user="media"' >> /etc/rc.conf ``` <a name="headphones"></a> **Headphones** ``` cd /usr/local && git clone git://github.com/rembo10/headphones.git chown -R media headphones && chgrp -R media headphones cp /usr/local/headphones/init-alt.freebsd /usr/local/etc/rc.d/headphones chmod +x /usr/local/etc/rc.d/headphones echo 'headphones_enable="YES"' >> /etc/rc.conf echo 'headphones_user="media"' >> /etc/rc.conf ``` <a name="plex"></a> **Plex** ``` cd /usr/ports/multimedia/plexmediaserver && make install clean cd /usr/local && mkdir plexdata chown -R media:media plexdata echo 'plexmediaserver_enable="YES"' >> /etc/rc.conf echo 'plexmediaserver_user="media"' >> /etc/rc.conf echo 'plexmediaserver_group="media"' >> /etc/rc.conf ``` <a name="subsonic"></a> **Subsonic** ``` cd /usr/ports/java/openjdk6-jre && make config-recursive && make install mkdir -p /usr/local/subsonic/standalone && cd /usr/local/subsonic/standalone wget -Osubsonic.tar.gz http://downloads.sourceforge.net/project/subsonic/subsonic/4.9/subsonic-4.9-standalone.tar.gz tar -zxvf subsonic.tar.gz rm subsonic.tar.gz chown -R media:media /usr/local/subsonic vi /usr/local/etc/rc.d/subsonic # Use the file "subsonic" attached below chmod a+x /usr/local/etc/rc.d/subsonic echo 'subsonic_enable="YES"' >> /etc/rc.conf echo 'subsonic_user="media"' >> /etc/rc.conf echo 'subsonic_bin="/usr/local/subsonic/standalone/subsonic.sh"' >> /etc/rc.conf echo 'subsonic_podcast_folder="/mnt/media/music/podcasts"' >> /etc/rc.conf echo 'subsonic_playlist_folder"/mnt/media/music/playlists"' >> /etc/rc.conf ``` Here is the [subsonic launch script](#file-subsonic) to use. <a name="transmission"></a> **Transmission** ``` cd /usr/ports/net-p2p/transmission-daemon && make config-recursive && make install clean echo 'transmission_enable="YES"' >> /etc/rc.conf echo 'transmission_user="media"' >> /etc/rc.conf echo 'transmission_watch_dir="/mnt/media/downloads/blackhole"' >> /etc/rc.conf echo 'transmission_download_dir="/mnt/media/downloads/complete"' >> /etc/rc.conf /usr/local/etc/rc.d/transmission start /usr/local/etc/rc.d/transmission stop vi /usr/local/etc/transmission/home/settings.json "incomplete-dir": "/mnt/media/downloads/incomplete", "incomplete-dir-enabled": true, "rpc-whitelist": "127.0.0.1,192.168.1.*", ``` <a name="calibre"></a> **Calibre** Version is a bit old in the repo. Might consider trying to install from source in the future. ``` cd /usr/ports/deskutils/calibre && make config-recursive && make install clean echo 'calibre_enable="YES"' >> /etc/rc.conf echo 'calibre_port="8082"' >> /etc/rc.conf echo 'calibre_user="media"' >> /etc/rc.conf echo 'calibre_library="/mnt/media/books"' >> /etc/rc.conf ``` <a name="webserver"></a> **Nginx webserver + PHP + MYSQL** For PHP5-extensions, include: bz2 curl fileinfo gd mbstring mcrypt mysqli openssl pdo_mysql pdo_pgsql pgsql zip For PHP5, include: FPM ``` cd /usr/ports/www/nginx && make config-recursive && make install clean cd /usr/ports/lang/php5-extensions && make config-recursive && make install clean cd /usr/ports/databases/mysql56-server && make config-recursive && make install clean cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini cd /usr/local/etc/nginx && cp nginx.conf-dist nginx.conf && cp mim.types-dist mime.types echo 'nginx_enable="YES"' >> /etc/rc.conf echo 'php_fpm_enable="YES"' >> /etc/rc.conf echo 'mysql_enable="YES"' >> /etc/rc.conf /usr/local/etc/rc.d/mysql-server start mysql_secure_installation ``` Modify nginx.conf similar to the attached [nginx.conf](#file-nginx-conf) file. Make sure to pay close attention to where "root" is and "location ~ \.php$". You can overwrite the file with ":wq!" Create a similar [index.html](#file-index-html) as below in folder /usr/local/www. <a name="tt-rss"></a> **Tiny Tiny RSS** Helpful link: http://tt-rss.org/forum/viewtopic.php?f=16&t=911 ``` cd /usr/ports/www/tt-rss && make config-recursive && make install clean echo 'ttrssd_enable="YES"' >> /etc/rc.conf mysql -u root -p CREATE DATABASE ttrssdb; GRANT ALL ON ttrssdb.* TO ttrssuser IDENTIFIED BY "pick some random long password with lots of words BLAMMY"; quit; chown -R www:www /usr/local/www/tt-rss rm /usr/local/www/tt-rss/config.php ``` Testing ------- ``` service sshd start /usr/local/etc/rc.d/couchpotato start /usr/local/etc/rc.d/sickbeard start /usr/local/etc/rc.d/headphones start /usr/local/etc/rc.d/sabnzbd start /usr/local/etc/rc.d/plexmediaserver start /usr/local/etc/rc.d/transmission start /usr/local/etc/rc.d/nginx start /usr/local/etc/rc.d/php-fpm start /usr/local/etc/rc.d/calibre start /usr/local/etc/rc.d/subsonic start ``` Now check to make sure everything is running fine (<a href="http://192.168.1.3">192.168.1.3</a>). Then shut down the plugin server and start it up again. Everything should still be working fine. Backups ------- **Important files** Sickbeard replacement: sickbeard.db and config.ini Sabnzbd replacement: sabnzbd.ini Couch potato replacement: Plex: not worth it **Moving over databases and config files from plugins** Log into FreeNAS ``` cp /mnt/tetra/plugins_1/usr/pbi/sickbeard-amd64/data/config.ini /mnt/tetra/media_jail/usr/local/sickbeard cp /mnt/tetra/plugins_1/usr/pbi/sickbeard-amd64/data/sickbeard.db /mnt/tetra/media_jail/usr/local/sickbeard cp /mnt/tetra/plugins_1/usr/pbi/sabnzbdplus-amd64/sabnzbd/sabnzbd.ini /mnt/tetra/media_jail/usr/local/sabnzbd cp /mnt/tetra/plugins_1/usr/pbi/headphones-amd64/data/config.ini /mnt/tetra/media_jail/usr/local/headphones/ cp /mnt/tetra/plugins_1/usr/pbi/headphones-amd64/data/headphones.db /mnt/tetra/media_jail/usr/local/headphones/ cp /mnt/tetra/plugins_1/usr/local/CouchPotatoServer/data/settings.conf /mnt/tetra/media_jail/usr/local/CouchPotatoServer/data cp /mnt/tetra/plugins_1/usr/local/CouchPotatoServer/data/couchpotato.db /mnt/tetra/media_jail/usr/local/CouchPotatoServer/data ``` Make sure your settings move across the boundary. Daemons might not start up if ip's, filepaths, etc. are different. **Crashplan** Go to the plugins tab and install crashplan under the "Available" tab. This should create a new jail called crashplan_1. Now go to Plugins menu on the right and click Crashplan to accept the license agreement. Finally go to the "Installed" tab and turn the plugin on. Now add the directories you want to backup. Finally, open up a terminal to the jail and perform the following actions: ``` echo 'sshd_enable="YES"' >> /etc/rc.conf vi /etc/ssh/sshd_config # add the following to the end of the file Match User backup AllowTcpForwarding yes adduser # backup with Uid 1002 ``` Restart the jail. Now follow [this guide](http://support.code42.com/CrashPlan/Latest/Configuring/Configuring_A_Headless_Client) to modify your current crashplan install to work on the remote machine. You will need to create a port bridge over ssh, which you can do with the following command (before starting up crashplan locally): ``` ssh -L 4200:localhost:4243 [email protected] ``` Helpful codes ------------- Mounting USB drive: ``` kldload fuse mkdir /mnt/usb ntfs-3g /dev/da1s1 /mnt/usb ntfs-3g -o permissions /dev/da1s1 /mnt/usb ``` Rsync files ``` &rsync --progress --stats --recursive --times --perms --links --dry-run /mnt/tetra /mnt/usb/tetra nohup foo & rsync -az -H --delete --numeric-ids --stats --progress -e ssh [email protected]:/mnt/tetra/family /media/jacob/usb/tetra rsync -az -H --delete --numeric-ids --stats --progress -e ssh [email protected]:/mnt/tetra/media_jail/usr/local/sickbeard/data/config.ini /media/jacob/usb/tetra/backup cp ``` Copy server and daemon config files and databases ``` mkdir /mnt/tetra/backup/server_configs cd /mnt/tetra/backup/server_configs rsync -aqz /mnt/tetra/media_jail/usr/local/sickbeard/config.ini /mnt/tetra/media_jail/usr/local/sickbeard/sickbeard.db sickbeard/ rsync -aqz /mnt/tetra/media_jail/usr/local/sabnzbd/sabnzbd.ini sabnzbd/ rsync -aqz /mnt/tetra/media_jail/usr/local/headphones/config.ini /mnt/tetra/media_jail/usr/local/headphones/headphones.db headphones/ rsync -aqz /mnt/tetra/media_jail/usr/local/CouchPotatoServer/data/settings.conf /mnt/tetra/media_jail/usr/local/CouchPotatoServer/data/couchpotato.db couchpotato/ rsync -aqz /mnt/tetra/media_jail/usr/local/etc/nginx/nginx.conf /mnt/tetra/media_jail/usr/local/www/home/index.html nginx/ ``` ``` cd /mnt/tetra/backup/server_configs rsync -aqz sabnzbd/sabnzbd.ini /mnt/tetra/media_jail/usr/local/sabnzbd/ rsync -aqz sickbeard/config.ini sickbeard/sickbeard.db /mnt/tetra/media_jail/usr/local/sickbeard/ rsync -aqz headphones/config.ini headphones/headphones.db /mnt/tetra/media_jail/usr/local/headphones/ rsync -aqz couchpotato/settings.conf couchpotato/couchpotato.db /mnt/tetra/media_jail/usr/local/CouchPotatoServer/data/ cd /usr/local && chmod -R media:media sabnzbd sickbeard headphones CouchPotatoServer ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ <html> <body> <ul> <li><a href="http://192.168.1.2">FreeNAS</a></li> <li><a href="ftp://192.168.1.3">NAS FTP</a></li> <li><a href="http://192.168.1.3:8080">Sabnzbd</a></li> <li><a href="http://192.168.1.3:8081">Sick Beard</a></li> <li><a href="http://192.168.1.3:5050">Couch Potato</a></li> <li><a href="http://192.168.1.3:8181">Headphones</a></li> <li><a href="http://192.168.1.3:32400/web/">Plex</a></li> <li><a href="http://192.168.1.3:9091">Transmission</a></li> <li><a href="http://192.168.1.3:8082">Calibre</a></li> <li><a href="http://192.168.1.3/tt-rss/">TT-RSS</a></li> <li><a href="http://192.168.1.3:4040">Subsonic</a></li> </ul> </body> </html> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,49 @@ worker_processes 1; error_log logs/error.log; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; index index.php index.htm index.html; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { root /usr/local/www; listen 80; server_name localhost; location / { } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/local/www/nginx-dist; } location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/bin/sh # # PROVIDE: subsonic # REQUIRE: LOGIN DAEMON NETWORKING # KEYWORD: shutdown # # To enable subsonic, add this line to your /etc/rc.conf: # # subsonic_enable="YES" # # And optionally these line: # # subsonic_user="username" # Default is "root" # subsonic_bin="/path/to/subsonic.sh" # Default is "/usr/local/sbin/subsonic.sh" . /etc/rc.subr name="subsonic" rcvar="subsonic_enable" load_rc_config $name required_files=$subsonic_bin : ${subsonic_enable="NO"} : ${subsonic_user="root"} : ${subsonic_bin="/usr/local/subsonic/standalone/subsonic.sh"} : ${subsonic_music_folder="/mnt/media/music"} : ${subsonic_podcast_folder="/mnt/media/podcasts"} : ${subsonic_playlist_folder="/mnt/media/playlists"} command=$subsonic_bin command_args="--home=/usr/local/subsonic --default-music-folder=/mnt/media/music --default-podcast-folder=/mnt/media/podcasts --default-playlist-folder=/mnt/media/playlists" run_rc_command "$1"