Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installscript for OpenSuSE #170

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions installers/opensuse.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
wget -q https://raw.github.com/marcuswhybrow/minecraft-server-manager/master/installers/common.sh -O /tmp/msmcommon.sh
source /tmp/msmcommon.sh && rm -f /tmp/msmcommon.sh

function update_system_packages() {
install_log "Updating sources"
sudo zypper update || install_error "Couldn't update package list"
}

function install_dependencies() {
install_log "Installing required packages"
sudo zypper install screen rsync zip || install_error "Couldn't install dependencies"
}

function reload_cron() {
install_log "Reloading cron service"
hash service 2>/dev/null
if [[ $? == 0 ]]; then
sudo service cron reload
else
sudo /etc/init.d/cron reload
fi
}

function enable_init() {
install_log "Enabling automatic startup and shutdown"
hash insserv 2>/dev/null
if [[ $? == 0 ]]; then
sudo insserv msm
else
sudo update-rc.d msm defaults
fi
}

install_msm