Others

还有一些其他的点,顺带记录下

Samba

安装软件后,配置目录,添加smb用户和密码

apt install samba
vim /etc/samba/smb.conf

[global]
  workgroup = SAMBA
  security = user
  passdb backend = tdbsam
  printing = cups 
  printcap name = cups
  load printers = yes
  cups options = raw

[other]
  comment = other
  path = /data/other
  browseable = yes
  writable = yes
  public = yes
  write list = +smbuser1  
smbpasswd -a smbuser1  # 添加用户,设置密码,这个密码是samba的密码

把Sonarr的docker IP添加到Transmission 访问白名单

Transmission我们是docker安装的,所以白名单的IP是docker的IP,我们使用以下命令获取到sonarr的IP

docker network inspect sonarr_default

假设得到的是172.18.0.1,那么我们在transmission的配置文件中添加以下内容即可,这样的话,sonarr就可以访问transmission了

- WHITELIST=127.0.0.1,10.0.3.*,172.17.*.*
- HOST_WHITELIST=127.0.0.1,10.0.3.*,172.17.*.*

fstab

# /etc/fstab
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=xxxxxx /data/other ext4 defaults 0 0

其中的UUID可以使用blkid命令获取,填入即可

rc.local

vim /etc/systemd/system/rclocal.service

[Unit]
Description=Other Starting Scripts
After=network.target

[Service]
ExecStart=/opt/rclocal/rc.local

[Install]
WantedBy=multi-user.target
chmod +x /etc/systemd/system/rclocal.service
systemctl enable rclocal
vim /opt/rclocal/rc.local

#!/bin/bash
# your commands
iptables -t nat -A POSTROUTING -j MASQUERADE # 开启nat
sdparm --flexible -6 -l --set SCT=6000 --set STANDBY=1 /dev/sda # 设置硬盘休眠时间