Skip to content

Commit 0f648e9

Browse files
committed
chore: add depoly function
1 parent c1b73af commit 0f648e9

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>Label</key>
6+
<string>__LABEL__</string>
7+
<key>ProgramArguments</key>
8+
<array>
9+
<string>__BIN_PATH__</string>
10+
</array>
11+
<key>WorkingDirectory</key>
12+
<string>__ROOT_DIR__</string>
13+
<key>RunAtLoad</key>
14+
<true/>
15+
<key>KeepAlive</key>
16+
<true/>
17+
<key>StandardOutPath</key>
18+
<string>__STDOUT_PATH__</string>
19+
<key>StandardErrorPath</key>
20+
<string>__STDERR_PATH__</string>
21+
</dict>
22+
</plist>

deploy/systemd/mkblog.service.tpl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[Unit]
2+
Description=__APP_NAME__ blog service
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
User=__USER__
8+
Group=__GROUP__
9+
WorkingDirectory=__ROOT_DIR__
10+
ExecStart=__BIN_PATH__
11+
Restart=always
12+
RestartSec=3
13+
14+
[Install]
15+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)