This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backup the original server.sh file | |
cp ~/.vscode-server/bin/*/server.sh ~/.vscode-server/bin/server.sh.bak | |
# Add sudo to node runner in server.sh | |
if sed -i "/node/s/^/sudo /" ~/.vscode-server/bin/*/server.sh; then | |
echo "sudo added to node runner in server.sh" | |
else | |
echo "Failed to add sudo to node runner. Please check the sed command." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Powershell Functions for adding/removing/showing entries to the hosts file. | |
# | |
# Known limitations: | |
# - does not handle entries with comments afterwards ("<ip> <host> # comment") | |
# | |
Function Use-RunAs { | |
# Check if script is running as Administrator and if not use RunAs | |
# Use Check Switch to check if admin | |
param([Switch]$Check) |