質問編集履歴
2
記述ミス修正 sudo chmod -f 755 /home/pi/Bot/* -> sudo chmod -R 755 /home/pi/Bot/*
test
CHANGED
File without changes
|
test
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
|
117
117
|
|
118
118
|
|
119
|
-
sudo chmod -
|
119
|
+
sudo chmod -R 755 /home/pi/Bot/*
|
120
120
|
|
121
121
|
sudo vim /etc/systemd/system/bot.service
|
122
122
|
|
1
サービス化手順を追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
|
65
65
|
[Service]
|
66
66
|
|
67
|
-
ExecStart=/usr/local/bin/dotnet
|
67
|
+
ExecStart=/usr/local/bin/dotnet Bot.dll
|
68
68
|
|
69
69
|
WorkingDirectory=/home/pi/Bot/
|
70
70
|
|
@@ -99,3 +99,61 @@
|
|
99
99
|
|
100
100
|
|
101
101
|
どうすれば正常に動作するか教えて下さい。
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
追記
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
サービス化の手順は下記のとおりです
|
110
|
+
|
111
|
+
```
|
112
|
+
|
113
|
+
sftp経由でBot.dllほか依存DLLを/home/pi/Bot/にコピー
|
114
|
+
|
115
|
+
/home/pi/Bot/ 内のファイル所有者はpi:pi
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
sudo chmod -f 755 /home/pi/Bot/*
|
120
|
+
|
121
|
+
sudo vim /etc/systemd/system/bot.service
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
[Unit]
|
126
|
+
|
127
|
+
Description="NAME"
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
[Service]
|
132
|
+
|
133
|
+
ExecStart=/usr/local/bin/dotnet Bot.dll
|
134
|
+
|
135
|
+
WorkingDirectory=/home/pi/Bot/
|
136
|
+
|
137
|
+
Restart=always
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
[Install]
|
142
|
+
|
143
|
+
WantedBy=multi-user.target
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
sudo chmod 755 /etc/systemd/system/bot.service
|
148
|
+
|
149
|
+
sudo chown root:root /etc/systemd/system/bot.service
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
sudo systemctl daemon-reload
|
154
|
+
|
155
|
+
sudo systemctl start bot
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
```
|