From f9c1892765f0d891ec4ef71813a9ed6a124de098 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 4 Jul 2022 00:55:58 +0800 Subject: [PATCH] add archlinux --- scripts/install/arch.sh | 37 +++++++++++++++++++++++++++++++++++++ scripts/install_dev.sh | 2 ++ scripts/update/arch.sh | 34 ++++++++++++++++++++++++++++++++++ scripts/update_dev.sh | 2 ++ 4 files changed, 75 insertions(+) create mode 100644 scripts/install/arch.sh create mode 100644 scripts/update/arch.sh diff --git a/scripts/install/arch.sh b/scripts/install/arch.sh new file mode 100644 index 000000000..cd28407ec --- /dev/null +++ b/scripts/install/arch.sh @@ -0,0 +1,37 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + + + +echo y | pacman -Sy yaourt +echo y | pacman -Sy python3 + + + + + + + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + +cd /www/server/mdserver-web && ./cli.sh start +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done + +cd /www/server/mdserver-web && /etc/init.d/mw stop +cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default \ No newline at end of file diff --git a/scripts/install_dev.sh b/scripts/install_dev.sh index a68b29024..27b8353dd 100755 --- a/scripts/install_dev.sh +++ b/scripts/install_dev.sh @@ -33,6 +33,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then + OSNAME='arch' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip diff --git a/scripts/update/arch.sh b/scripts/update/arch.sh new file mode 100644 index 000000000..a7fda8afe --- /dev/null +++ b/scripts/update/arch.sh @@ -0,0 +1,34 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH +LANG=en_US.UTF-8 + + + +# echo y | pacman -Sy yaourt +# echo y | pacman -Sy python3 + + + + +cd /www/server/mdserver-web/scripts && bash lib.sh +chmod 755 /www/server/mdserver-web/data + + +cd /www/server/mdserver-web && ./cli.sh start +isStart=`ps -ef|grep 'gunicorn -c setting.py app:app' |grep -v grep|awk '{print $2}'` +n=0 +while [[ ! -f /etc/init.d/mw ]]; +do + echo -e ".\c" + sleep 1 + let n+=1 + if [ $n -gt 20 ];then + echo -e "start mw fail" + exit 1 + fi +done + +cd /www/server/mdserver-web && /etc/init.d/mw stop +cd /www/server/mdserver-web && /etc/init.d/mw start +cd /www/server/mdserver-web && /etc/init.d/mw default \ No newline at end of file diff --git a/scripts/update_dev.sh b/scripts/update_dev.sh index 1e0b9a1fb..b8a558dbc 100755 --- a/scripts/update_dev.sh +++ b/scripts/update_dev.sh @@ -28,6 +28,8 @@ if [ ${_os} == "Darwin" ]; then elif grep -Eq "openSUSE" /etc/*-release; then OSNAME='opensuse' zypper refresh +elif grep -Eqi "Arch" /etc/issue || grep -Eq "Arch" /etc/*-release; then + OSNAME='arch' elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then OSNAME='centos' yum install -y wget zip unzip