forked from YunoHost/yunohost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[enh] Add debian subdirectory and change root yolo structure
- Loading branch information
Jérôme Lebleu
committed
Jan 31, 2015
1 parent
eebefb8
commit 3a76e95
Showing
47 changed files
with
991 additions
and
1,207 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Source: moulinette-yunohost | ||
Section: net | ||
Priority: extra | ||
Maintainer: Jérôme Lebleu <[email protected]> | ||
Build-Depends: debhelper (>=8.0.0) | ||
Standards-Version: 3.9.4 | ||
Homepage: https://yunohost.org/ | ||
|
||
Package: moulinette-yunohost | ||
Architecture: all | ||
Depends: moulinette, | ||
python-psutil, | ||
python-requests, | ||
glances, | ||
python-pip, | ||
rubygems, | ||
pyminiupnpc, | ||
dnsutils | ||
Description: YunoHost Python scripts | ||
Python functions to manage a YunoHost instance | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bin/* /usr/bin/ | ||
data/actionsmap/* /usr/share/moulinette/actionsmap/ | ||
data/hooks/* /usr/share/yunohost/hooks/ | ||
data/other/* /usr/share/yunohost/yunohost-config/moulinette/ | ||
lib/yunohost/* /usr/lib/moulinette/yunohost/ | ||
locales/* /usr/lib/moulinette/yunohost/locales/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#! /bin/bash | ||
### BEGIN INIT INFO | ||
# Provides: yunohost-api | ||
# Required-Start: $local_fs $remote_fs $network $syslog | ||
# Required-Stop: $local_fs $remote_fs $network $syslog | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Start/stop YunoHost API | ||
### END INIT INFO | ||
|
||
DAEMON=/usr/bin/yunohost-api | ||
DAEMON_OPTS="" | ||
|
||
test -x $DAEMON || exit 0 | ||
|
||
. /lib/lsb/init-functions | ||
|
||
logger "YunoHost API: Start script executed" | ||
|
||
case "$1" in | ||
start) | ||
logger "YunoHost API: Starting" | ||
log_daemon_msg "Starting API: YunoHost" | ||
if [[ -f /etc/nginx/conf.d/openresty.conf ]]; | ||
then | ||
DAEMON_OPTS="--no-websocket" | ||
fi | ||
start-stop-daemon --start --background --pidfile /var/run/yunohost-api.pid --make-pidfile \ | ||
--exec /bin/bash -- -c "$DAEMON $DAEMON_OPTS >> /var/log/yunohost.log 2>&1" | ||
log_end_msg $? | ||
;; | ||
stop) | ||
logger "YunoHost API: Stopping" | ||
log_daemon_msg "Stopping API: YunoHost" | ||
if [ -f /var/run/yunohost-api.pid ]; then | ||
kill `cat /var/run/yunohost-api.pid` > /dev/null 2>&1 | ||
rm -f /var/run/yunohost-api.pid | ||
fi | ||
kill `ps aux | grep 'python /usr/bin/yunohost-api' | grep -v grep | awk '{print $2}'` > /dev/null 2>&1 | ||
kill `ps aux | grep 'yunohost-api' | grep -v grep | grep -v stop | awk '{print $2}'` > /dev/null 2>&1 | ||
log_end_msg 0 | ||
;; | ||
restart) | ||
logger "YunoHost API: Restarting" | ||
log_daemon_msg "Restarting API: YunoHost" | ||
if [ -f /var/run/yunohost-api.pid ]; then | ||
kill `cat /var/run/yunohost-api.pid` > /dev/null 2>&1 | ||
rm -f /var/run/yunohost-api.pid | ||
fi | ||
kill `ps aux | grep 'python /usr/bin/yunohost-api' | grep -v grep | awk '{print $2}'` > /dev/null 2>&1 | ||
kill `ps aux | grep 'yunohost-api' | grep -v grep | grep -v restart | awk '{print $2}'` > /dev/null 2>&1 | ||
kill `ps aux | grep 'yunohost.tac' | grep -v grep | awk '{print $2}'` > /dev/null 2>&1 | ||
if [[ -f /etc/nginx/conf.d/openresty.conf ]]; | ||
then | ||
DAEMON_OPTS="--no-websocket" | ||
fi | ||
start-stop-daemon --start --background --pidfile /var/run/yunohost-api.pid --make-pidfile \ | ||
--exec /bin/bash -- -c "$DAEMON $DAEMON_OPTS >> /var/log/yunohost.log 2>&1" | ||
log_end_msg $? | ||
;; | ||
status) | ||
logger "YunoHost API: Running" | ||
log_daemon_msg "YunoHost API: Running" | ||
cat /var/run/yunohost-api.pid > /dev/null 2>&1 | ||
log_end_msg $? | ||
;; | ||
*) | ||
logger "YunoHost API: Invalid usage" | ||
echo "Usage: /etc/init.d/yunohost-api {start|stop|restart|status}" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
TMP=/usr/share/yunohost/yunohost-config/moulinette | ||
|
||
if [ ! -d /etc/yunohost ]; | ||
then | ||
mkdir -p /etc/yunohost | ||
fi | ||
|
||
# Allow users to access /media directory | ||
if [ ! -d /etc/skel/media ]; | ||
then | ||
mkdir -p /media | ||
ln -s /media /etc/skel/ | ||
fi | ||
|
||
#Firewall | ||
grep -q "UPNP:" /etc/yunohost/firewall.yml > /dev/null 2>&1 | ||
if [[ $? -eq 0 ]] || [ ! -f /etc/yunohost/firewall.yml ]; | ||
then | ||
cp $TMP/firewall.yml /etc/yunohost/ | ||
fi | ||
|
||
# App fetchlist | ||
if [ -f /etc/cron.d/yunohost-applist-yunohost ]; | ||
then | ||
sed -i "s/--no-ldap //g" /etc/cron.d/yunohost-applist-yunohost | ||
fi | ||
|
||
# Service list | ||
if [ ! -f /etc/yunohost/services.yml ]; | ||
then | ||
cp $TMP/services.yml /etc/yunohost/ | ||
fi | ||
|
||
# Stop old API | ||
ps aux | grep "yunohost.tac" | grep -qv grep | ||
if [[ $? -eq 0 ]]; | ||
then | ||
killall twistd | ||
fi | ||
|
||
rm -rf /var/cache/moulinette/* | ||
update-rc.d yunohost-api defaults | ||
service yunohost-api restart | ||
|
||
# Reload SSOwat conf if obsolete | ||
if [ -f /etc/yunohost/installed ]; | ||
then | ||
yunohost firewall upnp | grep -qi "true" | ||
if [[ $? -eq 0 ]]; | ||
then | ||
yunohost firewall upnp enable | ||
fi | ||
yunohost app ssowatconf | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ -f /etc/init.d/yunohost-api ]; then | ||
service yunohost-api stop | ||
# nc -zv 127.0.0.1 6787 < /dev/null 2> /dev/null | ||
# if [[ ! $? -eq 0 ]]; | ||
# then | ||
# exit 1 | ||
# fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/make -f | ||
# -*- makefile -*- | ||
|
||
# Uncomment this to turn on verbose mode. | ||
#export DH_VERBOSE=1 | ||
|
||
%: | ||
dh $@ | ||
|
||
override_dh_installinit: | ||
dh_installinit --name=yunohost-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (native) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.