Skip to content

Instantly share code, notes, and snippets.

View alexanderjackson's full-sized avatar

Alexander Jackson alexanderjackson

View GitHub Profile
#!/usr/bin/env python2
# -*- coding: utf8 -*-
__author__ = "Alexander Jackson"
__copyright__ = "Copyright 2019"
__credits__ = ["Michael J. Sanders"]
__license__ = "AGPL-3.0"
__version__ = "1.0.0"
__maintainer__ = "Alexander Jackson"
__email__ = "alexander.jackson@jackson-it.de"
__status__ = "Production"
#!/bin/bash
#
# This shell script and corresponding sqlite2mysql.py are used to
# migrate Seafile data from SQLite to MySQL.
#
# Setup:
#
# 1. Move this file and sqlite2mysql.py to the top directory of your Seafile
# installation path (e.g. /data/haiwen).
# 2. Run: ./sqlite2mysql.sh
#!/bin/sh
#set -x
DAEMON=seaf-daemon
USER_ID=${UID}
PROGRAMM=/var/lib/seafile-client/seaf-cli
PROGRAMM_PARAM=start
ps auxw | grep ${DAEMON} | grep ${USER_ID} | grep -v grep > /dev/null
if [ $? != 0 ]
SEAFILE_DIR=/var/lib/seafile/
SEAFILE_USER=$(stat -c %U ${SEAFILE_DIR})
SEAFILE_GROUP=$(stat -c %G ${SEAFILE_DIR})
chown -R ${SEAFILE_USER}.${SEAFILE_GROUP} ${SEAFILE_DIR}
service seafile-server start
@alexanderjackson
alexanderjackson / seafile-pro-installer
Created May 18, 2015 18:20
seafile-pro-installer
#!/bin/bash
#set -x
# -------------------------------------------
# Vars
# -------------------------------------------
SEAFILE_ADMIN=admin@seafile.lan
SEAFILE_USER=seafile
SEAFILE_SERVER_NAME=$(hostname -s | cut -c -16)
SEAFILE_DNS=$(hostname -i)
HOSTNAME=$(hostname -i)
#/bin/bash
#set -x
# -------------------------------------------
# Save at /usr/local/sbin/seafile-server-change-address and set permissions with
# chmod 500 /usr/local/sbin/seafile-server-change-address
# -------------------------------------------
# -------------------------------------------
# Vars