change content folder
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
go build .
|
go build .
|
||||||
mv fbBot /usr/local/bin/
|
mv fbBot /usr/local/bin/
|
||||||
cp contrib/etc /
|
cp contrib/etc /
|
||||||
|
mkdir -p /etc/fbBot/content
|
||||||
|
chmod 755 /etc/fbBot/content
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable fbBot.service
|
systemctl enable fbBot.service
|
||||||
systemctl start fbBot.service
|
systemctl start fbBot.service
|
||||||
|
|||||||
2
main.go
2
main.go
@@ -124,7 +124,7 @@ func postRequest(content *Webhook) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func cronTask() error {
|
func cronTask() error {
|
||||||
dir := filepath.Join(".", "content")
|
dir := filepath.Join("/etc", "fbBot", "content")
|
||||||
os.MkdirAll(dir, os.ModePerm)
|
os.MkdirAll(dir, os.ModePerm)
|
||||||
|
|
||||||
opts := append(chromedp.DefaultExecAllocatorOptions[:],
|
opts := append(chromedp.DefaultExecAllocatorOptions[:],
|
||||||
|
|||||||
Reference in New Issue
Block a user