From 0f0d7965c38d16b5611014ba263b96f0c27033f9 Mon Sep 17 00:00:00 2001 From: amass <168062547@qq.com> Date: Sun, 10 Nov 2024 21:30:02 +0800 Subject: [PATCH] add service. --- resources/build.sh | 3 +++ resources/older.service | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 resources/older.service diff --git a/resources/build.sh b/resources/build.sh index 5c66b83..fa27e38 100755 --- a/resources/build.sh +++ b/resources/build.sh @@ -70,6 +70,9 @@ function init() { scp ${build_path}/Libraries.tar.gz root@amass.fun:/opt/ ssh root@amass.fun "rm -fr /opt/Libraries; tar xvf /opt/Libraries.tar.gz -C /opt; rm -fr /opt/Libraries.tar.gz" + # scp resources/older.service root@amass.fun:/etc/systemd/system/ + # ssh root@amass.fun "systemctl daemon-reload; systemctl enable older; systemctl start older" + paths=( "/opt/Libraries/wt-4.11.1/lib" "/opt/Libraries/boost_1_86_0/lib" diff --git a/resources/older.service b/resources/older.service new file mode 100644 index 0000000..7e92d85 --- /dev/null +++ b/resources/older.service @@ -0,0 +1,13 @@ +[Unit] +Description=Http Server +After=network.target + +[Service] +Type=simple +ExecStart=/root/Server/HttpServer +WorkingDirectory=/root/Server +Restart=on-failure +User=root + +[Install] +WantedBy=multi-user.target