mirror of
https://git.zavage.net/Zavage-Software/smileyface.git
synced 2024-12-22 12:49:20 -07:00
retab and add +x permission on start/stop scripts
This commit is contained in:
parent
586aa9a1dc
commit
d018a8d9dd
@ -200,12 +200,14 @@ rsync -rvz \
|
|||||||
engineini="/srv/ut4-redirect.zavage.net/config/Engine.ini"
|
engineini="/srv/ut4-redirect.zavage.net/config/Engine.ini"
|
||||||
|
|
||||||
cmd = '''
|
cmd = '''
|
||||||
ssh mathewguest.com sed -i /ServerInstanceID=/c\ServerInstanceID=Hidden {gameini}
|
ssh mathewguest.com \
|
||||||
|
sed -i /ServerInstanceID=/c\ServerInstanceID=Hidden {gameini}
|
||||||
'''.format(gameini=gameini)
|
'''.format(gameini=gameini)
|
||||||
self._invoke_command(cmd)
|
self._invoke_command(cmd)
|
||||||
|
|
||||||
cmd = '''
|
cmd = '''
|
||||||
ssh mathewguest.com sed -i /RconPassword=/c\RconPassword=Hidden {engineini}
|
ssh mathewguest.com \
|
||||||
|
sed -i /RconPassword=/c\RconPassword=Hidden {engineini}
|
||||||
'''.format(engineini=engineini)
|
'''.format(engineini=engineini)
|
||||||
self._invoke_command(cmd)
|
self._invoke_command(cmd)
|
||||||
|
|
||||||
@ -213,7 +215,9 @@ ssh mathewguest.com sed -i /RconPassword=/c\RconPassword=Hidden {engineini}
|
|||||||
project_dir = self.ctx.config['app']['project_dir']
|
project_dir = self.ctx.config['app']['project_dir']
|
||||||
remote_redirect_host = self.ctx.config['app']['remote_redirect_host']
|
remote_redirect_host = self.ctx.config['app']['remote_redirect_host']
|
||||||
cmd = '''
|
cmd = '''
|
||||||
rsync -vz {project_dir}/ut4-server-ctl.sh {remote_redirect_host}
|
rsync -vz \
|
||||||
|
{project_dir}/ut4-server-ctl.sh \
|
||||||
|
{remote_redirect_host}
|
||||||
'''\
|
'''\
|
||||||
.format(**{
|
.format(**{
|
||||||
'project_dir': project_dir,
|
'project_dir': project_dir,
|
||||||
@ -227,7 +231,8 @@ rsync -vz {project_dir}/ut4-server-ctl.sh {remote_redirect_host}
|
|||||||
remote_redirect_host = self.ctx.config['app']['remote_redirect_host']
|
remote_redirect_host = self.ctx.config['app']['remote_redirect_host']
|
||||||
|
|
||||||
cmd = '''
|
cmd = '''
|
||||||
ssh mathewguest.com 'chown http.http /srv/ut4-redirect.zavage.net -R'
|
ssh mathewguest.com \
|
||||||
|
chown http.http /srv/ut4-redirect.zavage.net -R
|
||||||
'''
|
'''
|
||||||
self._invoke_command(cmd)
|
self._invoke_command(cmd)
|
||||||
|
|
||||||
@ -268,7 +273,9 @@ rsync -ravzp \
|
|||||||
|
|
||||||
# transfer #2
|
# transfer #2
|
||||||
cmd = '''
|
cmd = '''
|
||||||
rsync -avzp {project_dir}/ut4-server-ctl.sh {remote_game_host}:{remote_game_dir}
|
rsync -avzp \
|
||||||
|
{project_dir}/ut4-server-ctl.sh \
|
||||||
|
{remote_game_host}:{remote_game_dir}
|
||||||
'''\
|
'''\
|
||||||
.format(**{
|
.format(**{
|
||||||
'project_dir': project_dir,
|
'project_dir': project_dir,
|
||||||
@ -280,7 +287,9 @@ rsync -avzp {project_dir}/ut4-server-ctl.sh {remote_game_host}:{remote_game_dir}
|
|||||||
|
|
||||||
# transfer #3
|
# transfer #3
|
||||||
cmd = '''
|
cmd = '''
|
||||||
scp {project_dir}/instance/ut4-server.service {remote_game_host}:/etc/systemd/system/
|
scp \
|
||||||
|
{project_dir}/instance/ut4-server.service \
|
||||||
|
{remote_game_host}:/etc/systemd/system/
|
||||||
'''\
|
'''\
|
||||||
.format(**{
|
.format(**{
|
||||||
'project_dir': project_dir,
|
'project_dir': project_dir,
|
||||||
@ -292,7 +301,24 @@ scp {project_dir}/instance/ut4-server.service {remote_game_host}:/etc/systemd/sy
|
|||||||
|
|
||||||
# transfer #4
|
# transfer #4
|
||||||
cmd = '''
|
cmd = '''
|
||||||
ssh {remote_game_host} chown ut4.ut4 {remote_game_dir} -R
|
ssh {remote_game_host} \
|
||||||
|
chown ut4.ut4 {remote_game_dir} -R
|
||||||
|
'''.format(**{
|
||||||
|
'remote_game_host': remote_game_host,
|
||||||
|
'remote_game_dir': remote_game_dir
|
||||||
|
|
||||||
|
})
|
||||||
|
# subprocess.run(cmd, cwd=cwd)
|
||||||
|
self._invoke_command(cmd)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Fix +x permissions on bash scripts
|
||||||
|
cmd = '''
|
||||||
|
ssh {remote_game_host} \
|
||||||
|
chmod +x \
|
||||||
|
{remote_game_dir}/start-server.sh \
|
||||||
|
{remote_game_dir}/stop-server.sh
|
||||||
'''.format(**{
|
'''.format(**{
|
||||||
'remote_game_host': remote_game_host,
|
'remote_game_host': remote_game_host,
|
||||||
'remote_game_dir': remote_game_dir
|
'remote_game_dir': remote_game_dir
|
||||||
|
Loading…
Reference in New Issue
Block a user