Linux process check and restart
I have a test server, some times I need to monitor one test service and keep it always active. I plan to use crontab and shells to make a small solution to fix this problem. 1.Check serivce status...
I have a test server, some times I need to monitor one test service and keep it always active. I plan to use crontab and shells to make a small solution to fix this problem. 1.Check serivce status...
Unit is a lightweight open-source server, it is a webserver, application server and a proxy. How to use Unit? Let’s getting started. Install please read the official document. https://unit.nginx...
My MongoDB can’t start today. My server is Ubuntu 22. When I checked the logs that said ‘No space left on device’. I guess maybe when installling Ubuntu they use LVM. Below is adjusted space. 1. C...
经常会使用nginx 配置反向代理,代理末尾的斜杠配置组合大体上可以分为8种,所以总是忘记 location 和 proxy_pass 最后面的斜杠会对代理结果有怎样的影响。今天我们就来试试找个统一的规则。 server { listen 8000; server_name localhost; #配置反向代理 location /test/ { ...
ubuntu 20.04 startup script 1.Edit rc-local.service sudo vim /lib/systemd/system/rc-local.service Add [Install] at the end [Install] WantedBy=multi-user.target Alias=rc-local.service 2.Add /...
openwrt开机启动 /etc/init.d目录下面就是系统加载的开机配置,文件夹中的每个文件都代表一个service。 每个配置可以设置START优先级,数字越大启动越靠后,如果有很多需要依赖网络或者USB之类的启动程序最好设置靠后一些,等其他程序启动了再启动。 系统读取etc/init.d/下的启动配置文件后,系统会根据start优先级,按照顺序执行每个文件的start()函数中的命...
Windows cmd IP Get ipv6 @echo off SET IP= ipconfig /all|FINDSTR "IPv6">ipv6.txt SETLOCAL EnableDelayedExpansion FOR /F "delims=" %%a IN (ipv6.txt) DO ( SET IP=%%a ECHO !IP:~37,-5!>&...
Name.com auto-update dns #!/bin/bash cd /home/shells && myip=$(curl -s "http://myip.com") oldip=$(cat my_old_ip) if [[ $oldip == $myip ]];then echo 'the same ip' exit 0 else curl -u 'u...
Linux awk #输出第2行 ip -6 address show | grep inet6 | awk 'NR == 2 {print $2}' | cut -d'/' -f1 #输出奇数行 ip -6 address show | grep inet6 | awk 'NR % 2 == 1 {print $2}' | cut -d'/' -f1 #输出大于第三行 ip -6 ad...
Install add-apt-repository sudo apt-get update && sudo apt-get install software-properties-common -y Add qbittorrent-nox source # qBittorrent stable sudo add-apt-repository ppa:qbittorr...