diff --git a/system-info/install.sh b/system-info/install.sh index 4dd5e9f..daaa97c 100755 --- a/system-info/install.sh +++ b/system-info/install.sh @@ -6,7 +6,11 @@ if [ `uname` = Darwin ]; then cp $script_dir/system-info.plist ~/Library/LaunchAgents/system-info.plist launchctl load -w ~/Library/LaunchAgents/system-info.plist else - cp $script_dir/system-info.service ~/.config/systemd/user/system-info.service - systemctl --user enable system-info - systemctl --user start system-info + if [ "$WSL_DISTRO_NAME" = "" ]; then + cp $script_dir/system-info.service ~/.config/systemd/user/system-info.service + systemctl --user enable system-info + systemctl --user start system-info + else + echo -e "\033[0;33mwarning:\033[0m WSL detected, system-info systemd service disabled" + fi fi diff --git a/system-info/remove.sh b/system-info/remove.sh index 872bef0..070b17c 100755 --- a/system-info/remove.sh +++ b/system-info/remove.sh @@ -4,6 +4,10 @@ if [ `uname` = Darwin ]; then launchctl unload ~/Library/LaunchAgents/system-info.plist rm ~/Library/LaunchAgents/system-info.plist else - systemctl --user stop system-info - systemctl --user disable system-info + if [ "$WSL_DISTRO_NAME" = "" ]; then + systemctl --user stop system-info + systemctl --user disable system-info + else + echo -e "\033[0;33mwarning:\033[0m WSL detected, system-info systemd service disabled" + fi fi