Skip to content

Instantly share code, notes, and snippets.

View qxzg's full-sized avatar

qxzg qxzg

  • Beijing
View GitHub Profile
@qxzg
qxzg / zfs-sync.sh
Created April 24, 2020 09:52
zfs incremental sync
#!/bin/bash
zfs snap -r nvme@end
zfs rollback -r main-pool/backup/nvme@begen
zfs send -R -I nvme@begen nvme@end | zfs receive -v main-pool/backup/nvme
zfs destroy -R nvme@begen
zfs destroy -R main-pool/backup/nvme@begen
zfs rename -r nvme@end nvme@begen
zfs rename -r main-pool/backup/nvme@end main-pool/backup/nvme@begen
#! /bin/sh
while true
do
echo " CPU temp :"
sysctl -a |egrep -E "cpu\.[0-9]+\.temp"
echo
echo " HDD temp :"
for i in $(sysctl -n kern.disks)
do
DevTemp=`smartctl -a /dev/$i | awk '/Temperature_Celsius/{print $0}' | awk '{print $10 "C"}'`
@qxzg
qxzg / hh.service
Last active January 19, 2021 12:52
HentaiAtHome systemctl配置文件
[Unit]
Description=H@H Server
Documentation=https://e-hentai.org/hentaiathome.php
Requires=network.target
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root/hh/
@qxzg
qxzg / reppoe.sh
Last active April 7, 2019 03:09
ASUS路由器重新拨号
#!/bin/sh
killall pppd
sleep 3
pppd file /tmp/ppp/options.wan0
sleep 10
ping 8.8.8.8 -c 5
echo "==========================================="
curl myip.ipip.net
nvram set local_domain=$(nvram get lan_ipaddr)
nvram commit