aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlost+skunk <[email protected]>2024-07-13 22:12:50 +0300
committerlost+skunk <[email protected]>2024-07-13 22:12:50 +0300
commit097d58e16c503d0e6fd9ebe9cd84d257387c8284 (patch)
treed5747426aa8c089184fcee6d866ac8fb0f8229e9
parentcd86606f7a155752d78337378ad6e9fa6880122b (diff)
downloadskunky-art-097d58e16c503d0e6fd9ebe9cd84d257387c8284.tar.gz
skunky-art-097d58e16c503d0e6fd9ebe9cd84d257387c8284.tar.bz2
skunky-art-097d58e16c503d0e6fd9ebe9cd84d257387c8284.zip
Сервис для опенрц
-rw-r--r--app/config.go7
-rwxr-xr-xskunkyart.example.openrc11
2 files changed, 17 insertions, 1 deletions
diff --git a/app/config.go b/app/config.go
index 96aea40..c848b9c 100644
--- a/app/config.go
+++ b/app/config.go
@@ -40,9 +40,14 @@ var CFG = config{
func ExecuteConfig() {
go func() {
+ defer func() {
+ if r := recover(); r != nil {
+ recover()
+ }
+ }()
for {
Templates["instances.json"] = string(Download("https://git.macaw.me/skunky/SkunkyArt/raw/branch/master/instances.json").Body)
- time.Sleep(1 * time.Hour)
+ time.Sleep(1 * time.Second)
}
}()
diff --git a/skunkyart.example.openrc b/skunkyart.example.openrc
new file mode 100755
index 0000000..aba74ce
--- /dev/null
+++ b/skunkyart.example.openrc
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+name="SkunkyArt"
+description="Privacy frontend for deviantart.com"
+supervisor=supervise-daemon
+command=<path_to_skunkyart>
+command_args="-c <path_to_config>"
+directory="<path_to_dir_with_skunkyart>"
+
+depend() {
+ need net
+} \ No newline at end of file