fix: absolute path deleted
This commit is contained in:
parent
4f97e1efc3
commit
9f6739b855
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCRIPT=$(readlink -f "$0")
|
||||||
|
DIR=$(dirname "$SCRIPT")
|
||||||
|
|
||||||
# Update daemon files
|
# Update daemon files
|
||||||
/usr/bin/cp -ur $DIR/services/* ~/.config/systemd/user
|
cd $DIR
|
||||||
|
cp -ur ../services/* ~/.config/systemd/user
|
||||||
|
|
||||||
# Daemon launch
|
# Daemon launch
|
||||||
/usr/bin/systemctl --user daemon-reload
|
/usr/bin/systemctl --user daemon-reload
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
/usr/bin/curl localhost:8000 > ./__data__/data.out
|
SCRIPT=$(readlink -f "$0")
|
||||||
|
DIR=$(dirname "$SCRIPT")
|
||||||
|
|
||||||
|
cd $DIR
|
||||||
|
mkdir -p ../__data__/
|
||||||
|
curl localhost:8000 > ../__data__/data.out
|
|
@ -3,15 +3,17 @@ import subprocess
|
||||||
import os
|
import os
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from server import weather_run
|
from server import weather_run
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
def install(parsed):
|
def install(parsed) -> None:
|
||||||
args = parsed.parse_args()
|
args = parsed.parse_args()
|
||||||
if args.install:
|
if args.install:
|
||||||
projectDir = "/home/citrullux/ModernOSLabs"
|
projectDir = str(Path(__file__).resolve().parent.parent)
|
||||||
|
homeDir = os.getenv("HOME")
|
||||||
delivered = filecmp.cmp(
|
delivered = filecmp.cmp(
|
||||||
projectDir + "/services/wthrc.service",
|
projectDir + "/services/wthrc.service",
|
||||||
"/home/citrullux/.config/systemd/user/wthrc.service",
|
homeDir + "/.config/systemd/user/wthrc.service",
|
||||||
shallow=True,
|
shallow=True,
|
||||||
)
|
)
|
||||||
if not delivered:
|
if not delivered:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user