This file contains 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 characters
#!/bin/bash | |
if [[ $EUID != 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
black=$(tput setaf 0); red=$(tput setaf 1); green=$(tput setaf 2); yellow=$(tput setaf 3); | |
blue=$(tput setaf 4); magenta=$(tput setaf 5); cyan=$(tput setaf 6); white=$(tput setaf 7); | |
on_red=$(tput setab 1); on_green=$(tput setab 2); on_yellow=$(tput setab 3); on_blue=$(tput setab 4); | |
on_magenta=$(tput setab 5); on_cyan=$(tput setab 6); on_white=$(tput setab 7); bold=$(tput bold); | |
dim=$(tput dim); underline=$(tput smul); reset_underline=$(tput rmul); standout=$(tput smso); |
This file contains 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 characters
#!/bin/bash | |
if [[ $EUID != 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
black=$(tput setaf 0); red=$(tput setaf 1); green=$(tput setaf 2); yellow=$(tput setaf 3); | |
blue=$(tput setaf 4); magenta=$(tput setaf 5); cyan=$(tput setaf 6); white=$(tput setaf 7); | |
on_red=$(tput setab 1); on_green=$(tput setab 2); on_yellow=$(tput setab 3); on_blue=$(tput setab 4); | |
on_magenta=$(tput setab 5); on_cyan=$(tput setab 6); on_white=$(tput setab 7); bold=$(tput bold); | |
dim=$(tput dim); underline=$(tput smul); reset_underline=$(tput rmul); standout=$(tput smso); |
This file contains 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 characters
sudo su | |
vi /var/packages/Docker/etc/dockerd.json | |
like This | |
{ | |
"ipv6": true, | |
"insecure-registries":["rubyon.co.kr:5555"], | |
"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"] |
This file contains 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 characters
sudo docker run -d \ | |
--name tsearch_bot \ | |
--restart=always \ | |
-p 3000:3000 \ | |
rubyon.co.kr:5555/tsearch_bot |
This file contains 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 characters
sudo docker run -d \ | |
--name=owncloud \ | |
--restart=always \ | |
-v /home/docker/owncloud/apps:/var/www/html/apps \ | |
-v /home/docker/owncloud/config:/var/www/html/config \ | |
-v /home/docker/owncloud/data:/var/www/html/data \ | |
-p 8082:80 \ | |
owncloud |
This file contains 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 characters
# Update Plex | |
sudo docker exec -it plex /bin/bash | |
echo 1.5.0.3501-3b8374a5c > /version.txt | |
exit | |
sudo docker restart plex |
This file contains 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 characters
# Send request to Synology | |
srpc = SynologyRPC(host[0], host[1], self.conf('username'), self.conf('password'), self.conf('destination')) | |
if data['protocol'] == 'torrent_magnet': | |
log.info('Adding torrent URL %s', data['url']) | |
response = srpc.create_task(url = data['url']) | |
elif data['protocol'] in ['nzb', 'torrent']: | |
log.info('Adding torrent URL %s', data['url']) | |
response = srpc.create_task(url = data['url']) | |
# log.info('Adding %s' % data['protocol']) |
This file contains 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 characters
sudo docker run \ | |
--restart=always \ | |
--volume=/:/rootfs:ro \ | |
--volume=/var/run:/var/run:rw \ | |
--volume=/sys:/sys:ro \ | |
--volume=/var/lib/docker/:/var/lib/docker:ro \ | |
--publish=8080:8080 \ | |
--detach=true \ | |
--name=cadvisor \ | |
google/cadvisor:latest |
This file contains 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 characters
sudo nano /lib/systemd/system/docker.service | |
#### | |
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 | |
#### | |
systemctl daemon-reload | |
sudo service docker restart |
This file contains 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 characters
sudo docker run -d -it \ | |
--name=portainer \ | |
--restart=always \ | |
-v /home/docker/portainer/data:/data \ | |
-p 9000:9000 \ | |
portainer/portainer |