service
2023-09-21
2022-08-11
debugging
when kali is off, this mac will go crazy and hang everything.
need to scan for kali existance on demand, not all the time.
developing
should we use p2p networks to speed up remote connections like n2n
or tinc
?
would it be interesting to run all our kali connectors ranged from vscode-ssh-connect, rclone mount and direct ssh connection via kali
command dynamically by our kali discovery service, if we can reload the nginx daemon on demand.
using redis to store some daemon reported values.
how about we set the workding directory of redis-server
to /tmp
so that the dump.rdb
file will never take space after reboot?
we need to know if this will successifully launch after reboot since /tmp
may not exist by that time
default redis server port: 6379
install redis-server service:
1 | easyd -w /tmp -l redis_server -- /opt/homebrew/bin/redis-server |
first value is online
.
next value is kali_ip
.
using both value to determine whether to connect to kali or not, and the exact address.
2022-08-11
1 | cd /media/root/parrot |
because of the qqChatBot task, pyjom on kali may be syncing too often. need to check the watchdog logs.
turned out it is the __pycache__
dirs to be blamed
disable all sync related services on macos for debug:
main issue happens after local vscode launched.
the issue is such that the proxy setting not right.
to debug the service:
1 | sudo launchctl debug gui/501/pyjom_local_syncdog --stdout --stderr |
1 | # to be succint: |
we need to add some code for it. consider adding something alike to that to kali?
1 | os.environ["http_proxy"]="http://localhost:7930" |
1 | launchctl stop gui/501/pyjom_local_watchdog; |
install macos pyjom watchdog (local):
1 | easyd -l pyjom_local_watchdog -w /Users/jamesbrown/Desktop/works/sync_git_repos -- /usr/bin/python3 /Users/jamesbrown/Desktop/works/sync_git_repos/watchdog_macos.py |
install macos pyjom syncdog (local):
1 | easyd -l pyjom_local_syncdog -w /Users/jamesbrown/Desktop/works/sync_git_repos -- /usr/bin/python3 /Users/jamesbrown/Desktop/works/sync_git_repos/syncdog_macos.py |
2022-08-09
view full logs
1 | journalctl -u <serviceName>.service |
create, install, restart, reload
1 | cd /etc/systemd/system |
sample systemd service config files
maybe we should add some autorestart configs at it?
frpc_service.service
1 | [Unit] |
pyjom_webdav_rclone_service.service
1 | [Unit] |
tempthrottle.service
1 | [Unit] |
clash_fastgithub.service
1 | [Unit] |
tujia_scraper_qq_bot.service
1 | [Unit] |
sync_git_repos_syncdog.service
1 | [Unit] |
2022-07-27
to relaunch app in given workspace
tools:
wmctrl
references:
https://unix.stackexchange.com/questions/27050/how-to-start-an-application-on-a-different-workspace
https://askubuntu.com/questions/89946/open-application-in-specific-workspace
npm install -g linux-window-session-manager
restore session manually
dconf-editor
org.gnome.gnome-session
auto-save-session -> on