sudo apt install --reinstall python3
sudo apt install --reinstall python
`` sudo update-alternatives --remove-all python
sudo apt install --reinstall python3
sudo apt install --reinstall python
`` sudo update-alternatives --remove-all python
This process requires that you are able to ssh OR log in locally using the root user account and that no services be running as users out of /home on the target machine.
The examples are from a default installation with no customization-you NEED to know what you're working with for volumes/partitions to not horribly break things.
By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /
,/home
and swap.
NOTE: If you want to be sure that nothing is writing to /home
you can either modify the host to boot into single-user mode OR try to use the
systemctl isolate runlevel1.target
command to switch (not tested! should work).
#!/bin/bash | |
# Have to redirect stderr to stdout here because slave.py uses stderr for output. | |
~/bin/slave.py list 2>&1 >/dev/null | grep beaker-slave- | while read slave; do | |
echo | |
echo "Checking status of $slave..." | |
# First, check if we can SSH into the host. If we can, then check the process and maybe shut down. | |
# This makes sure that we don't consider an SSH failure to be reason to shut down the node. | |
if ssh $slave echo < /dev/null; then |
Sure, Github wins on the UI. Hands down. But, despite my initial annoyance with Gerrit when I first started using it almost a year ago, I am now a convert. Fully. Let me tell you why.
Note: This is an opinionated (on purpose) piece. I assume your preferences are like mine on certain ideas, such as:
server{ | |
listen 80; | |
server_name example.com; | |
access_log /home/path_to_site/access.log; | |
error_log /home/path_to_site/error.log; | |
location / { | |
proxy_pass http://0.0.0.0:8002; | |
proxy_set_header Host $host; |
MANIFEST_FILE='AndroidManifest.xml' | |
VERSIONCODE=`grep versionCode $MANIFEST_FILE | sed 's/.*versionCode="//;s/".*//'` | |
VERSIONNAME=`grep versionName $MANIFEST_FILE | sed 's/.*versionName="//;s/\.[0-9]*".*//'` | |
NEWCODE=$BUILD_NUMBER | |
NEWNAME=$VERSIONNAME.$BUILD_NUMBER | |
echo "Updating Android build information. New version code: $NEWCODE - New version name: $NEWNAME"; | |
sed -i 's/versionCode *= *"'$VERSIONCODE'"/versionCode="'$NEWCODE'"/; s/versionName *= *"[^"]*"/versionName="'$NEWNAME'"/' $MANIFEST_FILE |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |