Skip to content

Instantly share code, notes, and snippets.

View stranljip's full-sized avatar

Carsten Heidmann stranljip

  • Disy Informationssysteme GmbH
  • Deutschland
View GitHub Profile
#
# Systemd unit file for Apache Tomcat for user-instance-name
#
[Unit]
Description=description
After=network.target
[Service]
# /etc/systemd/system/screenrunner.service
[Service]
User=user-to-run-as
Type=simple
RemainAfterExit=yes
ExecStart=/usr/bin/screen -dmS screenname bash -c "/usr/bin/python3 /some/python/script.py"
[Install]
WantedBy=multi-user.target
@stranljip
stranljip / fix-venv.sh
Created January 18, 2018 07:22 — forked from porterjamesj/fix-venv.sh
Fix virtualenv symlinks after upgrading python with Homebrew and running brew cleanup
#!/usr/bin/env bash
#
# Fix virtualenv symlinks after upgrading python with Homebrew and then running
# `cleanup`.
#
# After upgrading Python using Homebrew and then running `brew cleanup` one can
# get this message while trying to run python:
# dyld: Library not loaded: @executable_path/../.Python
# Referenced from: /Users/pablo/.venv/my-app/bin/python
# Reason: image not found