Created
May 5, 2019 07:33
-
-
Save PatPeter/259ee687fcaeebfdc8ce5bf1a0ced980 to your computer and use it in GitHub Desktop.
Verifies that config files are symlinked in each server directory.
This file contains 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 | |
servers=( scp1 scp2 scp3 scp4 scp5 scp6 scp7 scp8 ) | |
for s in ${servers[@]} | |
do | |
if [ -d "servers/$s" ] | |
then | |
rm -f servers/$s/config_gameplay.txt | |
ln -s ~/scp/servers/$s/config.txt ~/scp/servers/$s/config_gameplay.txt | |
echo Created symbolic link servers/$s/config_gameplay.txt | |
rm -f servers/$s/config_remoteadmin.txt | |
ln -s ~/.config/SCP\ Secret\ Laboratory/config_remoteadmin.txt ~/scp/servers/$s/config_remoteadmin.txt | |
echo Created symbolic link servers/$s/config_remoteadmin.txt | |
fi | |
echo Finished processing server $s | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment