首页
关于
壁纸
直播
留言
友链
统计
Search
1
《三国志英杰传》攻略
6,136 阅读
2
Emby客户端IOS破解
6,001 阅读
3
白嫖Emby
5,985 阅读
4
《吞食天地1》金手指代码
5,384 阅读
5
破解emby-server
4,260 阅读
moonjerx
game
age-of-empires
zx3
san-guo-zhi
尼尔:机械纪元
net
emby
learn-video
docker
torrent
photoshop
route
minio
git
ffmpeg
im
vue
gitlab
typecho
svn
alipay
nasm
srs
mail-server
tailscale
kkfileview
aria2
webdav
synology
redis
oray
chemical
mxsite
math
π
x-ui
digital-currency
server
nginx
baota
k8s
http
cloud
linux
shell
database
vpn
esxi
rancher
domain
k3s
ewomail
os
android
windows
ios
app-store
macos
develop
java
javascript
uniapp
nodejs
hbuildx
maven
android-studio
jetbrain
jenkins
css
mybatis
php
python
hardware
hard-disk
pc
RAM
software
pt
calibre
notion
office
language
literature
philosophy
travel
登录
Search
标签搜索
ubuntu
mysql
openwrt
zerotier
springboot
centos
openvpn
jdk
吞食天地2
synology
spring
idea
windows11
吞食天地1
transmission
google-play
Japanese
xcode
群晖
kiftd
MoonjerX
累计撰写
377
篇文章
累计收到
465
条评论
首页
栏目
moonjerx
game
age-of-empires
zx3
san-guo-zhi
尼尔:机械纪元
net
emby
learn-video
docker
torrent
photoshop
route
minio
git
ffmpeg
im
vue
gitlab
typecho
svn
alipay
nasm
srs
mail-server
tailscale
kkfileview
aria2
webdav
synology
redis
oray
chemical
mxsite
math
π
x-ui
digital-currency
server
nginx
baota
k8s
http
cloud
linux
shell
database
vpn
esxi
rancher
domain
k3s
ewomail
os
android
windows
ios
app-store
macos
develop
java
javascript
uniapp
nodejs
hbuildx
maven
android-studio
jetbrain
jenkins
css
mybatis
php
python
hardware
hard-disk
pc
RAM
software
pt
calibre
notion
office
language
literature
philosophy
travel
页面
关于
壁纸
直播
留言
友链
统计
搜索到
377
篇与
moonjerx
的结果
2022-12-20
宝塔面板启动项配置
#!/bin/bash # chkconfig: 2345 55 25 # description: bt Cloud Service ### BEGIN INIT INFO # Provides: bt # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts bt # Description: starts the bt ### END INIT INFO panel_init(){ panel_path=/www/server/panel pidfile=$panel_path/logs/panel.pid cd $panel_path env_path=$panel_path/pyenv/bin/activate if [ -f $env_path ];then source $env_path pythonV=$panel_path/pyenv/bin/python chmod -R 700 $panel_path/pyenv/bin else pythonV=/usr/bin/python fi reg="^#\!$pythonV\$" is_sed=$(cat $panel_path/BT-Panel|head -n 1|grep -E $reg) if [ "${is_sed}" = "" ];then sed -i "s@^#!.*@#!$pythonV@" $panel_path/BT-Panel fi is_sed=$(cat $panel_path/BT-Task|head -n 1|grep -E $reg) if [ "${is_sed}" = "" ];then sed -i "s@^#!.*@#!$pythonV@" $panel_path/BT-Task fi chmod 700 $panel_path/BT-Panel chmod 700 $panel_path/BT-Task log_file=$panel_path/logs/error.log task_log_file=$panel_path/logs/task.log if [ -f $panel_path/data/ssl.pl ];then log_file=/dev/null fi port=$(cat $panel_path/data/port.pl) } panel_init get_panel_pids(){ isStart=$(ps aux|grep -E '(runserver|BT-Panel)'|grep -v grep|awk '{print $2}'|xargs) pids=$isStart arr=$isStart } get_task_pids(){ isStart=$(ps aux|grep -E '(task.py|BT-Task)'|grep -v grep|awk '{print $2}'|xargs) pids=$isStart arr=$isStart } panel_start() { isStart=`ps aux|grep 'runserver:app'|grep -v grep|awk '{print $2}'` if [ "$isStart" != '' ];then kill -9 $isStart fi get_panel_pids if [ "$isStart" == '' ];then rm -f $pidfile panel_port_check echo -e "Starting Bt-Panel...\c" nohup $panel_path/BT-Panel >> $log_file 2>&1 & isStart="" n=0 while [[ "$isStart" == "" ]]; do echo -e ".\c" sleep 0.5 get_panel_pids let n+=1 if [ $n -gt 8 ];then break; fi done if [ "$isStart" == '' ];then echo -e "\033[31mfailed\033[0m" echo '------------------------------------------------------' tail -n 20 $log_file echo '------------------------------------------------------' echo -e "\033[31mError: BT-Panel service startup failed.\033[0m" fi echo -e " \033[32mdone\033[0m" else echo "Starting Bt-Panel... Bt-Panel (pid $(echo $isStart)) already running" fi get_task_pids if [ "$isStart" == '' ];then echo -e "Starting Bt-Tasks... \c" nohup $panel_path/BT-Task >> $task_log_file 2>&1 & sleep 0.2 get_task_pids if [ "$isStart" == '' ];then echo -e "\033[31mfailed\033[0m" echo '------------------------------------------------------' tail -n 20 $task_log_file echo '------------------------------------------------------' echo -e "\033[31mError: BT-Task service startup failed.\033[0m" return; fi echo -e " \033[32mdone\033[0m" else echo "Starting Bt-Tasks... Bt-Tasks (pid $isStart) already running" fi } panel_port_check() { is_process=$(lsof -n -P -i:$port|grep LISTEN|grep -v grep|awk '{print $1}'|sort|uniq|xargs) for pn in ${is_process[@]} do if [ "$pn" = "nginx" ];then /etc/init.d/nginx restart fi if [ "$pn" = "httpd" ];then /etc/init.d/httpd restart fi if [ "$pn" = "mysqld" ];then /etc/init.d/mysqld restart fi if [ "$pn" = "superviso" ];then pkill -9 superviso sleep 0.2 supervisord -c /etc/supervisor/supervisord.conf fi if [ "$pn" = "pure-ftpd" ];then /etc/init.d/pure-ftpd restart fi if [ "$pn" = "memcached" ];then /etc/init.d/memcached restart fi if [ "$pn" = "sudo" ];then if [ -f /etc/init.d/redis ];then /etc/init.d/redis restart fi fi if [ "$pn" = "php-fpm" ];then php_v=(52 53 54 55 56 70 71 72 73 74); for pv in ${php_v[@]}; do if [ -f /etc/init.d/php-fpm-${pv} ];then if [ -f /www/server/php/%{pv}/sbin/php-fpm ];then if [ -f /tmp/php-cgi-${pv}.sock ];then /etc/init.d/php-fpm-${pv} start fi /etc/init.d/php-fpm-${pv} restart fi fi done fi done is_ports=$(lsof -n -P -i:$port|grep LISTEN|grep -v grep|awk '{print $2}'|xargs) if [ "$is_ports" != '' ];then kill -9 $is_ports sleep 1 fi } panel_stop() { echo -e "Stopping Bt-Tasks...\c"; get_task_pids arr=($pids) for p in ${arr[@]} do kill -9 $p done echo -e " \033[32mdone\033[0m" echo -e "Stopping Bt-Panel...\c"; get_panel_pids for p in ${arr[@]} do kill -9 $p &>/dev/null done if [ -f $pidfile ];then rm -f $pidfile fi echo -e " \033[32mdone\033[0m" } panel_status() { port=$(cat $panel_path/data/port.pl) get_panel_pids if [ "$isStart" != '' ];then echo -e "\033[32mBt-Panel (pid $(echo $isStart)) already running\033[0m" else echo -e "\033[31mBt-Panel not running\033[0m" fi get_task_pids if [ "$isStart" != '' ];then echo -e "\033[32mBt-Task (pid $isStart) already running\033[0m" else echo -e "\033[31mBt-Task not running\033[0m" fi } panel_reload() { isStart=$(ps aux|grep 'runserver:app'|grep -v grep|awk '{print $2}') if [ "$isStart" != '' ];then kill -9 $isStart sleep 0.5 fi get_panel_pids if [ "$isStart" != '' ];then get_panel_pids for p in ${arr[@]} do kill -9 $p done rm -f $pidfile panel_port_check echo -e "Reload Bt-Panel.\c"; nohup $panel_path/BT-Panel >> $log_file 2>&1 & isStart="" n=0 while [[ "$isStart" == "" ]]; do echo -e ".\c" sleep 0.5 get_panel_pids let n+=1 if [ $n -gt 8 ];then break; fi done if [ "$isStart" == '' ];then echo -e "\033[31mfailed\033[0m" echo '------------------------------------------------------' tail -n 20 $log_file echo '------------------------------------------------------' echo -e "\033[31mError: BT-Panel service startup failed.\033[0m" return; fi echo -e " \033[32mdone\033[0m" else echo -e "\033[31mBt-Panel not running\033[0m" panel_start fi } install_used() { if [ ! -f $panel_path/aliyun.pl ];then return; fi password=$(cat /dev/urandom | head -n 16 | md5sum | head -c 12) username=$($pythonV $panel_path/tools.py panel $password) safe_path=$(cat /dev/urandom | head -n 16 | md5sum | head -c 8) echo "$safe_path" > $panel_path/admin_path.pl echo "$password" > $panel_path/default.pl rm -f $panel_path/aliyun.pl } error_logs() { tail -n 100 $log_file } case "$1" in 'start') install_used panel_start ;; 'stop') panel_stop ;; 'restart') panel_stop sleep 1 panel_start ;; 'reload') panel_reload ;; 'status') panel_status ;; 'logs') error_logs ;; 'panel') $pythonV $panel_path/tools.py cli $2 ;; 'default') LOCAL_IP=$(ip addr | grep -E -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -E -v "^127\.|^255\.|^0\." | head -n 1) port=$(cat $panel_path/data/port.pl) password=$(cat $panel_path/default.pl) if [ -f $panel_path/data/domain.conf ];then address=$(cat $panel_path/data/domain.conf) fi if [ -f $panel_path/data/admin_path.pl ];then auth_path=$(cat $panel_path/data/admin_path.pl) fi if [ "$address" = "" ];then address=$(curl -sS --connect-timeout 10 -m 60 https://www.bt.cn/Api/getIpAddress) fi pool=http if [ -f $panel_path/data/ssl.pl ];then pool=https fi echo -e "==================================================================" echo -e "\033[32mBT-Panel default info!\033[0m" echo -e "==================================================================" echo "外网面板地址: $pool://$address:$port$auth_path" echo "内网面板地址: http://${LOCAL_IP}:$port$auth_path" echo -e "\033[33m*以下仅为初始默认账户密码,若无法登录请执行bt命令重置账户/密码登录\033[0m" echo -e `$pythonV $panel_path/tools.py username` echo -e "password: $password" echo -e "\033[33mIf you cannot access the panel,\033[0m" echo -e "\033[33mrelease the following panel port [${port}] in the security group\033[0m" echo -e "\033[33m若无法访问面板,请检查防火墙/安全组是否有放行面板[${port}]端口\033[0m" echo -e "==================================================================" ;; *) $pythonV $panel_path/tools.py cli $1 ;; esac
2022年12月20日
227 阅读
0 评论
0 点赞
2022-12-19
ubuntu安装nginx
1.下载linux版安装包将下载的nginx安装包上传至ubuntu系统。解压 nginx-1.22.0.tar.gz 包:tar -zxvf ./nginx-1.22.0.tar.gz -C /home/$USER/soft/2.安装nginx所需的依赖sudo apt-get install gccsudo apt-get install libpcre3 libpcre3-devsudo apt-get install zlib1g-devsudo apt-get install openssl libssl-dev3.编译和安装nginx在nginx根目录执行配置文件./configure编译和安装sudo apt-get install makesudo make && sudo make install或者sudo make -j32 && sudo make install4.测试nginx是否安装成功:/usr/local/nginx/sbin/nginx -v5.设置开机启动编写命令脚本sudo touch /etc/init.d/nginx sudo chmod a+x /etc/init.d/nginx sudo vim /etc/init.d/nginx#! /bin/sh # nginx Startup script for the Nginx HTTP Server # it is v.0.0.2 version. # chkconfig: - 85 15 # description: Nginx is a high-performance web and proxy server. # It has a lot of features, but it's not for everyone. # processname: nginx # pidfile: /var/run/nginx.pid # config: /usr/local/nginx/conf/nginx.conf # chkconfig: 2345 55 25 # Description: Nginx startup script for the HTTP Server on Ubuntu. Place in /etc/init.d and # run 'update-rc.d -f nginx defaults', or use the appropriate command on your # distro. For CentOS/Redhat run: 'chkconfig --add nginx' ### BEGIN INIT INFO # Provides: nginx # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts the nginx web server # Description: starts nginx using start-stop-daemon ### END INIT INFO #注意:这里的变量需要根据具体的环境而做修改。 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin NAME=nginx NGINX_BIN=/usr/local/nginx/sbin/$NAME CONFIGFILE=/usr/local/nginx/conf/$NAME.conf PIDFILE=/usr/local/nginx/logs/$NAME.pid ulimit -n 8192 case "$1" in start) echo -n "Starting $NAME... " if [ -f $PIDFILE ];then mPID=`cat $PIDFILE` isStart=`ps ax | awk '{ print $1 }' | grep -e "^${mPID}$"` if [ "$isStart" != '' ];then echo "$NAME (pid `pidof $NAME`) already running." exit 1 fi fi $NGINX_BIN -c $CONFIGFILE if [ "$?" != 0 ] ; then echo " failed" exit 1 else echo " done" fi ;; stop) echo -n "Stoping $NAME... " if [ -f $PIDFILE ];then mPID=`cat $PIDFILE` isStart=`ps ax | awk '{ print $1 }' | grep -e "^${mPID}$"` if [ "$isStart" = '' ];then echo "$NAME is not running." exit 1 fi else echo "$NAME is not running." exit 1 fi $NGINX_BIN -s stop if [ "$?" != 0 ] ; then echo " failed. Use force-quit" exit 1 else echo " done" fi ;; status) if [ -f $PIDFILE ];then mPID=`cat $PIDFILE` isStart=`ps ax | awk '{ print $1 }' | grep -e "^${mPID}$"` if [ "$isStart" != '' ];then echo "$NAME (pid `pidof $NAME`) already running." exit 1 else echo "$NAME is stopped" exit 0 fi else echo "$NAME is stopped" exit 0 fi ;; restart) $0 stop sleep 1 $0 start ;; reload) echo -n "Reload service $NAME... " if [ -f $PIDFILE ];then mPID=`cat $PIDFILE` isStart=`ps ax | awk '{ print $1 }' | grep -e "^${mPID}$"` if [ "$isStart" != '' ];then $NGINX_BIN -s reload echo " done" else echo "$NAME is not running, can't reload." exit 1 fi else echo "$NAME is not running, can't reload." exit 1 fi ;; configtest) echo -n "Test $NAME configure files... " $NGINX_BIN -t ;; *) echo "Usage: $0 {start|stop|restart|reload|status|configtest}" exit 1 ;; esac编写系统服务脚本vim /lib/systemd/system/nginx.service# systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # This unit gets pulled automatically into multi-user.target by [Unit] Description=/etc/init.d/nginx ConditionFileIsExecutable=/etc/init.d/nginx After=network.target [Service] Type=forking ExecStart=/etc/init.d/nginx start ExecReload=/etc/init.d/nginx reload ExecStop=/etc/init.d/nginx stop ExecStatus=/etc/init.d/nginx status TimeoutSec=0 RemainAfterExit=yes #### 添加 #### [Install] WantedBy=multi-user.target Alias=nginx.service
2022年12月19日
52 阅读
0 评论
0 点赞
2022-12-19
渡有心人,送给年轻人
人生最有价值的知识主次及比例①预防人生意外事故、研究透彻各种不良习气危害并避之,预防运动损伤,健体使身体稳固不易损伤及休息养神的知识(60%);②上好学,培养傍身技能,记住稀缺是精髓,但生活刚需手艺活,专研透了,也能养你一辈子(30%);③怎么教育子女,做好社会角色分工(8%);④艺术素养 乐器、绘画、舞蹈等(2%)。健康活着,持续健康活着,持续幸福健康活着。起步迟没关系,只要跑的越久,就跑的越远。清醒的头脑,健全的四肢,充实的肠胃,是每天要核查和保持。保持健康,生活便进可攻,退可守。警惕贪(对于喜好的过于偏执)、嗔(对于讨厌的反应过激)、痴(对不明事理表现贪与嗔的反应),一旦发作,让人失去驾驭人生大局的基本理智。凡事三思:思危、思退、思变。这个社会需要有真实能力的人去做事这个世界健康其实才是最稀缺的东西其他:充分准备,克制墨菲定律。①最好一辈子不沾酒,喝酒不爬高,醉了一定要找低矮床铺休息。②膝关节是人体最复杂的关节,一定不要损伤,因为最复杂,一旦损伤,修复也是最难的。③健身体成习惯,心平静,充分热身,量力而行,场地光线充足安全无障碍。高度近视避免快速剧烈运动。盘状半月板及扁平足要减少腿脚负重冲击运动。④我们成长中,各种原因原生环境,思想上行为上或多或少都背负着那么一些歪理邪说成分,长大了,要懂得筛查找出,不然它就好比一颗雷,谁知道那天触发了它就炸了。⑤终生要思考追求的话题:这个世界的真实面貌是什么样的,事实是什么;生存能力中判断力高于一切,只有真实客观的判断才能做出正确的选择,什么是好。⑥远离极度自私垃圾人,远离以权力背景压人的人,若不可避免,至少与他们相处时,一定要思危,嗅到不对及时跑路,躲到安全的地方,以逸待劳。⑦身材管理,体重/身高平方<22kg/m²。推荐叔本华的《人生的智慧》,梁应林《人生意外800鉴》,杨渝平《运动损伤那些事》。预防几个疾病病毒肝炎(疫苗)、艾滋病(洁身)、肺结核(健身营养)、膝关节半月板撕裂(软骨损伤不可再生)、椎间盘突出、老人股骨头骨折、尘肺(呼衰),脊髓损伤、脑梗偏瘫(不能自理)狂犬病。出门看天气防雷电溺水、高空坠物、车祸、踩空,拌倒,滑摔。健康是为了生命充分绽放。最重要的是早早意识到这些问题,关注到这些问题,生活中主动避免
2022年12月19日
123 阅读
0 评论
0 点赞
2022-12-19
日本一个兼职工作网站
https://townwork.net/?arc=1
2022年12月19日
61 阅读
0 评论
0 点赞
2022-12-19
英文优美句子
Will you always be good to meHow can I get your attentionEverything is inferior to you你会一直对我好吗我怎样才能引起你的注意一切都不如你Are you free in the eveningAm I the only one for youWould you like to accompany me to see the stars你晚上有空吗我是唯一适合你的人吗你愿意陪我去看星星吗Don't leave me How easy it is to give upI would like to pursue for you all my life不要离开我放弃是多么容易我愿意为你追求一生if i'm holdinThe dark past is the dawnThe scattered moonlight passed through the clouds如果我坚持下去黑暗的过去是黎明散射的月光穿过云层I like the salty smell of the sea breezeYou used to be around me from morning till nightI'm looking forward to every minute我喜欢海风的咸味你从前从早到晚都在我身边我期待每一分钟I'm the one you're looking forDid you have sugar todayWill the tired eyes be awakened 我是你要找的人你今天吃糖了吗疲惫的眼睛会被唤醒吗
2022年12月19日
83 阅读
0 评论
0 点赞
1
...
21
22
23
...
76
您的IP: