Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions argos/argos_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ function do_install {
cp argos/argos.service /lib/systemd/system/argos.service
cp argos/argos_lookup.service /lib/systemd/system/argos_lookup.service
cp argos/service_lookup.py /data/argos/service_lookup.py
cp argos/argos_lookup.timer /lib/systemd/system/argos_lookup.timer
chmod +x /data/argos/service_lookup.py

systemctl daemon-reload

service argos_lookup start
sleep 40
service argos start
systemctl enable argos.service
systemctl enable argos_lookup.service
systemctl enable argos_lookup.timer
systemctl daemon-reload
echo "Installation Successful"
}
Expand All @@ -105,6 +105,7 @@ function uninstall_only {
echo "Removing services files"
rm /lib/systemd/system/argos.service
rm /lib/systemd/system/argos_lookup.service
rm /lib/systemd/system/argos_lookup.timer
rm -rf /data/immudb
rm /usr/bin/ffmpeg
rm -rf /data/argos
Expand Down
8 changes: 8 additions & 0 deletions argos/argos_lookup.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description="Run script after 3 minutes of boot"

[Timer]
OnBootSec=3min

[Install]
WantedBy=timers.target
5 changes: 3 additions & 2 deletions argos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"utils/parameters.sh",
"argos/argos.service",
"argos/service_lookup.py",
"argos/argos_lookup.service"
"argos/argos_lookup.service",
"argos/argos_lookup.timer"
]
}
}
4 changes: 2 additions & 2 deletions argos/service_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def wipe_hosts(hostname):

def restart_service():
process = subprocess.Popen(
['service', 'minio', 'restart'],
['service', 'argos', 'restart'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
Expand Down Expand Up @@ -125,4 +125,4 @@ def fetch_parse_avahi():
else:
print('No changes')

time.sleep(50)
time.sleep(10)