☀️ 尝试支持 Docker 构建
This commit is contained in:
parent
94c16fbaa6
commit
7b6926bb38
@ -38,5 +38,7 @@ RUN git clone -b master https://github.com/xtaodada/PagerMaid-Modify.git /pagerm
|
|||||||
WORKDIR /pagermaid/workdir
|
WORKDIR /pagermaid/workdir
|
||||||
RUN python3 -m virtualenv venv
|
RUN python3 -m virtualenv venv
|
||||||
RUN source venv/bin/activate; pip3 install -r requirements.txt
|
RUN source venv/bin/activate; pip3 install -r requirements.txt
|
||||||
|
USER root
|
||||||
|
RUN cd /pagermaid/workdir
|
||||||
CMD ["sh","utils/docker-run.sh"]
|
CMD ["sh","utils/docker-run.sh"]
|
||||||
|
|
||||||
|
@ -82,13 +82,13 @@ login() {
|
|||||||
|
|
||||||
systemctl_reload(){
|
systemctl_reload(){
|
||||||
echo "正在写入系统进程守护 . . ."
|
echo "正在写入系统进程守护 . . ."
|
||||||
sudo -i>> /dev/null 2>&1
|
|
||||||
echo "[Unit]
|
echo "[Unit]
|
||||||
Description=PagerMaid-Modify telegram utility daemon
|
Description=PagerMaid-Modify telegram utility daemon
|
||||||
After=network.target
|
After=network.target
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
[Service]
|
[Service]
|
||||||
|
User=pagermaid
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/pagermaid/workdir
|
WorkingDirectory=/pagermaid/workdir
|
||||||
ExecStart=/pagermaid/workdir/venv/bin/python -m pagermaid
|
ExecStart=/pagermaid/workdir/venv/bin/python -m pagermaid
|
||||||
@ -97,7 +97,6 @@ systemctl_reload(){
|
|||||||
chmod 755 pagermaid.service >> /dev/null 2>&1
|
chmod 755 pagermaid.service >> /dev/null 2>&1
|
||||||
systemctl daemon-reload >> /dev/null 2>&1
|
systemctl daemon-reload >> /dev/null 2>&1
|
||||||
systemctl enable pagermaid >> /dev/null 2>&1
|
systemctl enable pagermaid >> /dev/null 2>&1
|
||||||
su pagermaid >> /dev/null 2>&1
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "请在脚本退出后输入 exit 退出 Docker"
|
echo "请在脚本退出后输入 exit 退出 Docker"
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
Reference in New Issue
Block a user